ahocevar
070c1ec029
Resolve constraints for View#animate() API calls
2019-04-05 17:13:55 +02:00
Olivier Guyot
405e206717
View / better names for getValid* and applyParameters_ methods
2019-02-22 15:04:54 +01:00
Olivier Guyot
433bccd207
Linting and fixes for unit tests
2019-02-22 15:01:30 +01:00
Olivier Guyot
e023c144bb
View / add adjust* methods to manipulate the view more easily
...
API changes:
* (breaking) the `rotate` method is gone
* the `adjustRotation`, `adjustResolution` and `adjustZoom` methods are now
available and allow using an anchor.
This means interactions do not have to do the anchor computation themselves
and this also fix anchor computation when constraints must be applied.
2019-02-22 15:01:30 +01:00
jahow
cd186ada7f
Add new tests for View & Interaction w/ fixes
2019-02-22 15:01:30 +01:00
Olivier Guyot
1c5fd62e43
View / refactor how zoom and resolution are computed
...
This commit aims to simplify the computation of zoom and resolution in the
View class.
Previously zoom levels and resolution computations were mixed in different places,
ie resolution constraints, initial values, etc.
Now the View class only has the `getZoomForResolution` and `getResolutionForZoom`
methods to convert from one system to another.
Other than that, most computations use the resolution system internally.
The `constrainResolution` method also does not exist anymore, and is replaced
by `getValidResolution` and `getValidZoomLevel` public methods.
2019-02-22 15:01:30 +01:00
Olivier Guyot
1f379a06a4
View / add support for viewport extent constraint
...
This introduces a breaking change:
The `extent` view option now constrains the whole viewport and not just the
view center.
The option `constrainOnlyCenter` was added to keep the previous behaviour.
Constraining the whole viewport and not only the view center means
that the center and resolution constraints must be applied with a knowledge of
the viewport size.
2019-02-22 15:01:30 +01:00
ahocevar
409c962caf
Reset lastDragTime when condition is not met
2018-12-21 22:26:05 +01:00
ahocevar
6cabb9dd0b
Remove drag segments of removed features
2018-12-05 12:02:35 +01:00
Kevin Schmidt
07349de59b
Add tests for interaction event handlers
2018-10-03 06:59:18 -06:00
Kevin Schmidt
942a0976be
Move interaction event handlers to class methods
2018-10-03 06:30:09 -06:00
ahocevar
9586c7cbc7
Get rid of private handler members
2018-10-03 05:06:01 -06:00
ahocevar
8ab1589f9a
Add getOverlay method to access sketch and selection layers
2018-08-15 10:59:38 +02:00
ahocevar
c74b9c1d55
Do not prevent default on pointermove
...
Instead, only prevent default on handled pointerdown events. This makes
the `focus` condition work with interactions that involve dragging on
touch devices.
2018-07-31 08:33:15 +02:00
Tim Schaub
40486a0ecc
Avoid shadowing EventTarget
2018-07-26 10:14:58 -06:00
ahocevar
45cf296ed4
Simplify calculation and add tests
2018-07-21 10:22:42 +02:00
Tim Schaub
b8c9125602
Remove lint
2018-07-18 10:35:54 -06:00
ahocevar
0a126b620c
Use class keyword in tests
2018-07-18 16:30:09 +02:00
ahocevar
e52cabcb31
Fix DragZoom tests
2018-07-18 15:41:13 +02:00
Frederic Junod
35158efbf0
Fix spelling
2018-03-12 15:18:58 +01:00
Tim Schaub
1404e9d61d
Remove remaining static members from Interaction
2018-02-25 12:46:57 -07:00
Tim Schaub
3f944ef76e
Remove static members from Modify
2018-02-25 09:18:44 -07:00
Tim Schaub
e0a99c43dc
Remove static members from Translate
2018-02-25 09:03:27 -07:00
Tim Schaub
f81f3e2e9f
Remove static members from Draw interaction
2018-02-21 15:55:22 -08:00
Nicholas L
7097b530f3
Rename extent
2018-02-19 20:33:03 +13:00
Tim Schaub
1c63234508
Remove private static members from Snap interaction
2018-02-12 07:12:02 -07:00
Tim Schaub
e8aae60066
Remove private static members from MouseWheelZoom interaction
2018-02-12 07:11:56 -07:00
Marc Jansen
3fee998108
Rename _ol_render_Box_ to RenderBox
2018-02-06 06:39:15 +01:00
Marc Jansen
6e764a20b3
Import events conditions explicitly
2018-02-05 20:36:42 +01:00
Tim Schaub
9cfee0f40b
Named exports from ol/has
2018-02-05 10:42:47 -07:00
Frederic Junod
70b0d5d1cc
Check if the sketch feature is defined in finishDrawing
...
Fixes #7035
2018-01-30 09:57:05 +01:00
Tim Schaub
7e7631c42a
Named exports from ol/events
2018-01-24 10:09:57 -07:00
Andreas Hocevar
67b7188ba4
Merge pull request #7703 from ahocevar/draw-state
...
Improved drawing experience on touch devices
2018-01-17 20:25:07 +01:00
Andreas Hocevar
276194d554
Add tests for vertex drag
2018-01-15 13:21:07 +01:00
Frederic Junod
fc256ed77e
Rename _ol_interaction_Translate_ to Translate
2018-01-15 09:40:37 +01:00
Andreas Hocevar
fbf951f005
Stop handling events immediately when click tolerance is exceeded
2018-01-14 23:26:28 +01:00
Tim Schaub
ad62739a6e
Use blocked scoped variables
...
In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
2018-01-12 00:50:30 -07:00
Tim Schaub
8cba211ecd
Rename _ol_pointer_PointerEvent_ to PointerEvent
2018-01-11 13:44:45 -07:00
Tim Schaub
b8cf046b38
Rename _ol_interaction_Snap_ to Snap
2018-01-11 12:10:54 -07:00
Tim Schaub
c9a91efc3d
Rename _ol_interaction_Select_ to Select
2018-01-11 12:10:54 -07:00
Tim Schaub
682b4402a0
Rename _ol_interaction_Modify_ to Modify
2018-01-11 12:10:54 -07:00
Tim Schaub
c7e2f6b62f
Rename _ol_interaction_Extent_ to ExtentInteraction
2018-01-11 12:09:58 -07:00
Tim Schaub
176021e188
Rename _ol_Collection_ to Collection
2018-01-11 12:06:58 -07:00
Tim Schaub
ca6ea355e6
Rename _ol_source_Vector_ to VectorSource
2018-01-10 09:36:28 -07:00
Tim Schaub
45c6e43b42
Rename _ol_layer_Vector_ to VectorLayer
2018-01-10 09:36:23 -07:00
Tim Schaub
1c1f008238
Rename _ol_View_ to View
2018-01-10 09:35:42 -07:00
Tim Schaub
22fce4f97b
Rename _ol_Feature_ to Feature
2018-01-10 09:35:35 -07:00
Frederic Junod
43377c1332
Rename _ol_interaction_MouseWheelZoom_ to MouseWheelZoom
2018-01-08 10:45:39 +01:00
Ron Young
9fa59d0735
rename map in tests
2017-12-21 23:11:42 -07:00
Tim Schaub
c89738cadb
Named exports instead of static functions from ol/geom/Polygon
2017-12-20 23:48:35 -07:00