Make View2D-only comments more consistent
This commit is contained in:
@@ -96,6 +96,7 @@ ol.interaction.DragRotateAndZoom.prototype.handleDrag =
|
|||||||
ol.interaction.DragRotateAndZoom.prototype.handleDragEnd =
|
ol.interaction.DragRotateAndZoom.prototype.handleDragEnd =
|
||||||
function(mapBrowserEvent) {
|
function(mapBrowserEvent) {
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
|
// FIXME works for View2D only
|
||||||
var view = map.getView().getView2D();
|
var view = map.getView().getView2D();
|
||||||
var direction = this.lastScaleDelta_ - 1;
|
var direction = this.lastScaleDelta_ - 1;
|
||||||
map.withFrozenRendering(function() {
|
map.withFrozenRendering(function() {
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ ol.interaction.DragRotate.prototype.handleDrag = function(mapBrowserEvent) {
|
|||||||
if (goog.isDef(this.lastAngle_)) {
|
if (goog.isDef(this.lastAngle_)) {
|
||||||
var delta = theta - this.lastAngle_;
|
var delta = theta - this.lastAngle_;
|
||||||
var view = map.getView();
|
var view = map.getView();
|
||||||
// FIXME supports View2D only
|
// FIXME works for View2D only
|
||||||
goog.asserts.assertInstanceof(view, ol.View2D);
|
goog.asserts.assertInstanceof(view, ol.View2D);
|
||||||
map.requestRenderFrame();
|
map.requestRenderFrame();
|
||||||
ol.interaction.Interaction.rotateWithoutConstraints(
|
ol.interaction.Interaction.rotateWithoutConstraints(
|
||||||
@@ -70,7 +70,7 @@ ol.interaction.DragRotate.prototype.handleDrag = function(mapBrowserEvent) {
|
|||||||
*/
|
*/
|
||||||
ol.interaction.DragRotate.prototype.handleDragEnd = function(mapBrowserEvent) {
|
ol.interaction.DragRotate.prototype.handleDragEnd = function(mapBrowserEvent) {
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
// FIXME supports View2D only
|
// FIXME works for View2D only
|
||||||
var view = map.getView();
|
var view = map.getView();
|
||||||
goog.asserts.assertInstanceof(view, ol.View2D);
|
goog.asserts.assertInstanceof(view, ol.View2D);
|
||||||
ol.interaction.Interaction.rotate(map, view, view.getRotation(), undefined,
|
ol.interaction.Interaction.rotate(map, view, view.getRotation(), undefined,
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ ol.interaction.TouchRotate.prototype.handleTouchMove =
|
|||||||
|
|
||||||
// rotate
|
// rotate
|
||||||
if (this.rotating_) {
|
if (this.rotating_) {
|
||||||
|
// FIXME works for View2D only
|
||||||
var view = map.getView().getView2D();
|
var view = map.getView().getView2D();
|
||||||
map.requestRenderFrame();
|
map.requestRenderFrame();
|
||||||
ol.interaction.Interaction.rotateWithoutConstraints(map, view,
|
ol.interaction.Interaction.rotateWithoutConstraints(map, view,
|
||||||
@@ -116,6 +117,7 @@ ol.interaction.TouchRotate.prototype.handleTouchEnd =
|
|||||||
function(mapBrowserEvent) {
|
function(mapBrowserEvent) {
|
||||||
if (this.targetTouches.length < 2) {
|
if (this.targetTouches.length < 2) {
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
|
// FIXME works for View2D only
|
||||||
var view = map.getView().getView2D();
|
var view = map.getView().getView2D();
|
||||||
if (this.rotating_) {
|
if (this.rotating_) {
|
||||||
ol.interaction.Interaction.rotate(
|
ol.interaction.Interaction.rotate(
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ ol.interaction.TouchZoom.prototype.handleTouchMove =
|
|||||||
}
|
}
|
||||||
|
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
|
// FIXME works for View2D only
|
||||||
var view = map.getView().getView2D();
|
var view = map.getView().getView2D();
|
||||||
|
|
||||||
// scale anchor point.
|
// scale anchor point.
|
||||||
@@ -95,6 +96,7 @@ ol.interaction.TouchZoom.prototype.handleTouchEnd =
|
|||||||
function(mapBrowserEvent) {
|
function(mapBrowserEvent) {
|
||||||
if (this.targetTouches.length < 2) {
|
if (this.targetTouches.length < 2) {
|
||||||
var map = mapBrowserEvent.map;
|
var map = mapBrowserEvent.map;
|
||||||
|
// FIXME works for View2D only
|
||||||
var view = map.getView().getView2D();
|
var view = map.getView().getView2D();
|
||||||
// Zoom to final resolution, with an animation, and provide a
|
// Zoom to final resolution, with an animation, and provide a
|
||||||
// direction not to zoom out/in if user was pinching in/out.
|
// direction not to zoom out/in if user was pinching in/out.
|
||||||
|
|||||||
Reference in New Issue
Block a user