Commit Graph

34 Commits

Author SHA1 Message Date
Marc Jansen
9386415633 Remove usage of goog.dom.TagName enum 2015-10-12 20:45:49 +02:00
Frederic Junod
d495b19448 Don't transform the angle into degrees to rotate the element 2015-10-06 14:04:47 +02:00
Marc Jansen
d728c71f02 Remove goog.isNull in control classes 2015-10-01 09:15:15 +02:00
Denilson Figueiredo de Sá
c8f0bb0ade Improve ol.control.Rotate.prototype.resetNorth_ performance
Changing. resetNorth_ function from O(n) to O(1).

To reproduce this issue, open the developer console and execute:

    map.getView().setRotation(5000000000);

Then click on the rotation button. Before the commit, it takes a few
seconds, after this commit it is instantaneous.

In addition, due to limited floating point precision, the previous code
calculates a different value from this one.
2015-09-30 09:37:51 -03:00
Tim Schaub
0927c55b3c Toward natural JavaScript syntax 2015-09-25 12:16:42 -06:00
Tim Schaub
a096ec5bf7 Remove goog.isDef from controls (-278 B) 2015-09-25 11:28:54 -06:00
Frederic Junod
761aa0ea5c Remove ol.control.Control.bindMouseOutFocusOutBlur function
It was a workaround added in #1761 to hide the button tooltip on
OSX / Chrome 32 and 33.

Because we're not using the tooltips anymore (see #2781) and this
version of chrome is deprecated this workaround can be removed.
2015-08-03 17:12:33 +02:00
Marc Jansen
41596d808b Add method to bind bluring on mouseout/focusout 2015-05-26 22:32:09 +02:00
Marc Jansen
346ead1b55 Add basic docs for rotatecontrol 2015-04-23 20:27:15 +02:00
Frederic Junod
65c2f7de5f Remove unused goog.require 2015-02-05 10:56:44 +01:00
tsauerwein
fbb2883f6e Add Node to control label type 2015-01-16 10:14:39 +01:00
Éric Lemoine
df170859cc Add a "render" control option 2014-12-12 18:30:02 +01:00
Frederic Junod
e55caef0d2 Remove 'pointerup' listener in ol.control.Rotate 2014-11-04 09:21:40 +01:00
Frederic Junod
6ca1640659 Don't pass an object to goog.dom.createDom for the class name
If the second argument to goog.dom.createDom is a string, then this is
the className of the new element.
2014-10-30 16:53:42 +01:00
Frederic Junod
9ebde652dc Use a standard title attribute for the control buttons 2014-10-28 15:22:46 +01:00
Frederic Junod
be6c6ee93c Remove unused ResetRotation name attribute 2014-10-07 12:25:41 +02:00
Éric Lemoine
79932ee2f2 Rotate control should not act on a null view 2014-09-17 13:32:31 +02:00
Éric Lemoine
cb8b896230 Make ol.Map#setView do not accept undefined
With this change map.setView(null) is permitted, but map.setView(undefined) is not. map.getView now always returns a defined value, which may be null is setView was called with null.
2014-09-17 11:47:24 +02:00
Frederic Junod
e136b4b4db Change the control visibility by using css class
Instead of changing the button opacity in the control, only add/remove
a css class (ol-hidden). This let the developer easily change the
behavior by updating the css.
2014-09-16 11:00:44 +02:00
Éric Lemoine
55db958290 Merge pull request #2564 from elemoine/apistable4
Add @api stable annotations for the ol.control namespace
2014-08-21 11:02:56 +02:00
Frederic Junod
7f086e138a Remove unnecessary local variable 2014-08-20 11:17:44 +02:00
Frederic Junod
27ae50e673 Only update rotate control element when it's needed
To avoid a lot of 'Recalculate style' events by the browser.
2014-08-20 10:58:18 +02:00
Frederic Junod
7c14399133 Add missing jsdoc tag 2014-08-20 10:58:18 +02:00
Frederic Junod
113888120f Use goog.math.toDegrees 2014-08-20 10:58:17 +02:00
Éric Lemoine
975e81a041 Add @api stable annotations for ol.control.Rotate 2014-08-19 16:59:02 +02:00
Tim Schaub
4cf5ab4620 Use @api annotation instead of @todo api 2014-07-05 15:41:14 -04:00
Tim Schaub
b9f444a008 Rename olx.View2DState to olx.ViewState and use viewState property 2014-06-27 09:58:25 -04:00
Tim Schaub
b88d2aebc9 Remove view.getView2D() method 2014-06-27 09:52:19 -04:00
Antoine Abt
5926611cd1 Merge pull request #2168 from tonio/keyboard_controls
Restore control’s keyboard navigation
2014-06-10 08:45:19 +02:00
Peter Robins
41d9f0360a Add @classdesc to classes 2014-06-09 12:10:19 -04:00
Antoine Abt
09719bdc70 Fixes button handlers event type 2014-06-06 09:32:39 +02:00
Antoine Abt
75cd5572aa Restore control’s keyboard navigation 2014-06-04 16:55:02 +02:00
Antoine Abt
0bec5b5590 Add base control class, to simplify stylesheet 2014-05-02 14:12:31 +02:00
Antoine Abt
229ae5e883 Add rotate control
- displayed when rotation ≠ 0
 - reset rotation on click
2014-05-02 14:12:31 +02:00