Prefer single line assignment to 80 character limit
This commit is contained in:
@@ -131,8 +131,7 @@ ol.interaction.Interaction.pan = function(map, view, delta, opt_duration) {
|
||||
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {number=} opt_duration Duration.
|
||||
*/
|
||||
ol.interaction.Interaction.rotate =
|
||||
function(map, view, rotation, opt_anchor, opt_duration) {
|
||||
ol.interaction.Interaction.rotate = function(map, view, rotation, opt_anchor, opt_duration) {
|
||||
rotation = view.constrainRotation(rotation, 0);
|
||||
ol.interaction.Interaction.rotateWithoutConstraints(
|
||||
map, view, rotation, opt_anchor, opt_duration);
|
||||
@@ -146,8 +145,7 @@ ol.interaction.Interaction.rotate =
|
||||
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {number=} opt_duration Duration.
|
||||
*/
|
||||
ol.interaction.Interaction.rotateWithoutConstraints =
|
||||
function(map, view, rotation, opt_anchor, opt_duration) {
|
||||
ol.interaction.Interaction.rotateWithoutConstraints = function(map, view, rotation, opt_anchor, opt_duration) {
|
||||
if (rotation !== undefined) {
|
||||
var currentRotation = view.getRotation();
|
||||
var currentCenter = view.getCenter();
|
||||
@@ -186,8 +184,7 @@ ol.interaction.Interaction.rotateWithoutConstraints =
|
||||
* will select the nearest resolution. If not defined 0 is
|
||||
* assumed.
|
||||
*/
|
||||
ol.interaction.Interaction.zoom =
|
||||
function(map, view, resolution, opt_anchor, opt_duration, opt_direction) {
|
||||
ol.interaction.Interaction.zoom = function(map, view, resolution, opt_anchor, opt_duration, opt_direction) {
|
||||
resolution = view.constrainResolution(resolution, 0, opt_direction);
|
||||
ol.interaction.Interaction.zoomWithoutConstraints(
|
||||
map, view, resolution, opt_anchor, opt_duration);
|
||||
@@ -201,8 +198,7 @@ ol.interaction.Interaction.zoom =
|
||||
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {number=} opt_duration Duration.
|
||||
*/
|
||||
ol.interaction.Interaction.zoomByDelta =
|
||||
function(map, view, delta, opt_anchor, opt_duration) {
|
||||
ol.interaction.Interaction.zoomByDelta = function(map, view, delta, opt_anchor, opt_duration) {
|
||||
var currentResolution = view.getResolution();
|
||||
var resolution = view.constrainResolution(currentResolution, delta, 0);
|
||||
ol.interaction.Interaction.zoomWithoutConstraints(
|
||||
@@ -217,8 +213,7 @@ ol.interaction.Interaction.zoomByDelta =
|
||||
* @param {ol.Coordinate=} opt_anchor Anchor coordinate.
|
||||
* @param {number=} opt_duration Duration.
|
||||
*/
|
||||
ol.interaction.Interaction.zoomWithoutConstraints =
|
||||
function(map, view, resolution, opt_anchor, opt_duration) {
|
||||
ol.interaction.Interaction.zoomWithoutConstraints = function(map, view, resolution, opt_anchor, opt_duration) {
|
||||
if (resolution) {
|
||||
var currentResolution = view.getResolution();
|
||||
var currentCenter = view.getCenter();
|
||||
|
||||
Reference in New Issue
Block a user