Add Hint and Property as ol.View properties

This commit is contained in:
Tim Schaub
2016-08-12 06:42:58 -06:00
parent 9cbbdc9242
commit 3afb42828f
19 changed files with 105 additions and 106 deletions

View File

@@ -1,7 +1,5 @@
goog.provide('ol.control.OverviewMap');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol');
goog.require('ol.Collection');
goog.require('ol.Map');
@@ -10,11 +8,13 @@ goog.require('ol.Object');
goog.require('ol.ObjectEventType');
goog.require('ol.Overlay');
goog.require('ol.OverlayPositioning');
goog.require('ol.ViewProperty');
goog.require('ol.View');
goog.require('ol.control.Control');
goog.require('ol.coordinate');
goog.require('ol.css');
goog.require('ol.dom');
goog.require('ol.events');
goog.require('ol.events.EventType');
goog.require('ol.extent');
@@ -211,7 +211,7 @@ ol.control.OverviewMap.prototype.handleMapPropertyChange_ = function(event) {
*/
ol.control.OverviewMap.prototype.bindView_ = function(view) {
ol.events.listen(view,
ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
ol.Object.getChangeEventType(ol.View.Property.ROTATION),
this.handleRotationChanged_, this);
};
@@ -223,7 +223,7 @@ ol.control.OverviewMap.prototype.bindView_ = function(view) {
*/
ol.control.OverviewMap.prototype.unbindView_ = function(view) {
ol.events.unlisten(view,
ol.Object.getChangeEventType(ol.ViewProperty.ROTATION),
ol.Object.getChangeEventType(ol.View.Property.ROTATION),
this.handleRotationChanged_, this);
};

View File

@@ -2,16 +2,16 @@
goog.provide('ol.control.ZoomSlider');
goog.require('ol.events');
goog.require('ol.events.Event');
goog.require('ol.events.EventType');
goog.require('ol.pointer.PointerEventHandler');
goog.require('ol.ViewHint');
goog.require('ol.View');
goog.require('ol.animation');
goog.require('ol.control.Control');
goog.require('ol.css');
goog.require('ol.easing');
goog.require('ol.events');
goog.require('ol.events.Event');
goog.require('ol.events.EventType');
goog.require('ol.math');
goog.require('ol.pointer.PointerEventHandler');
/**
@@ -255,7 +255,7 @@ ol.control.ZoomSlider.prototype.handleContainerClick_ = function(event) {
ol.control.ZoomSlider.prototype.handleDraggerStart_ = function(event) {
if (!this.dragging_ &&
event.originalEvent.target === this.element.firstElementChild) {
this.getMap().getView().setHint(ol.ViewHint.INTERACTING, 1);
this.getMap().getView().setHint(ol.View.Hint.INTERACTING, 1);
this.previousX_ = event.clientX;
this.previousY_ = event.clientY;
this.dragging_ = true;
@@ -306,7 +306,7 @@ ol.control.ZoomSlider.prototype.handleDraggerEnd_ = function(event) {
if (this.dragging_) {
var map = this.getMap();
var view = map.getView();
view.setHint(ol.ViewHint.INTERACTING, -1);
view.setHint(ol.View.Hint.INTERACTING, -1);
map.beforeRender(ol.animation.zoom({
resolution: /** @type {number} */ (this.currentResolution_),
duration: this.duration_,