25 Commits

Author SHA1 Message Date
Oscar Lorentzon
98fc886025 feat(tag): larger completer and remove completer line 2019-11-21 09:57:41 +01:00
Oscar Lorentzon
e9416c7752 fix(tag): use same font family across lib 2018-09-12 09:19:08 +00:00
Oscar Lorentzon
f3cb9032a0 feat(tag): set cursor on intercative element when editing
Ensure that cursor does not change when dragging fast so that
cursor exists and enters the dom vertex/center indicator.
2017-10-09 11:22:34 +00:00
Oscar Lorentzon
a579107523 refactor(tag): use viewport coords for render tag calc
Use viewport coords for calculations in create tag.
Use CSS transform for pixel translations.
Round pixel translations to ensure that DOM rendered
elements are not blurred.
Move static CSS to style sheet.
2017-08-04 06:25:02 +00:00
Oscar Lorentzon
55d1a41aad refactor(tag): use viewport coords for create tag calc
Use viewport coords for calculations in create tag.
Use transform for pixel translations.
Round pixel translations to ensure that DOM rendered
elements are not blurred.
2017-08-04 06:25:02 +00:00
Oscar Lorentzon
b09c030bbd fix: remove unused styles 2017-06-19 12:36:15 +00:00
Oscar Lorentzon
fb45ed297d Set pointer events to auto when elements should be target. 2017-03-08 07:12:46 +00:00
Oscar Lorentzon
8abc09cb09 Create canvas in separate container.
Separate canvas from dom rendered elements by creating
its own container.
Register mouse events on canvas container so that mouse over
and out fires correctly.
Use document mouse events for move and up when dragging.
Use document drag events inside canvas for tagging component
because canvas container events will not fire for dom
elements.
Set class name of outer container when creating in tag component.
Prevent default for desired events in affected components.
Remove mouse cursor div.
Make dom renderer container have no height.
Make canvas container have no height.
Make tag container have no height to avoid blocking events.
All dom rendered elements now affects mouse events causing mouse
out when reacting to pointer events.
2017-03-08 07:06:43 +00:00
Oscar Lorentzon
d11f278d43 Simplify z-index approach.
Interactive (e.g. navigation, attribution) element have z-index 10.
Overlayed elements (slider, route bubble) have z-index 20.
Filling elements have z-index -1 to 9.
Cover have z-index 100.
Special elements (debug) have z-index 50.

Do not change z-index in server cssnano plugin (z-index are not
changed when built from npm script).
2016-08-26 13:22:25 -04:00
Oscar Lorentzon
a43214d07e Pointer cursor for tag interaction vertices. 2016-08-03 11:41:47 -04:00
Oscar Lorentzon
c7760cdc05 Resize cursors for rectangle vertices. 2016-07-18 13:28:32 -04:00
Oscar Lorentzon
fd91d1880c Set cursor behavior for tag edit and create.
Use crosshair when creating tags.
Use crosshair for editing vertices.
Use pointer for icon.
No pointer events on container when not creating to be able to
fall back to other element cursors.
2016-07-05 08:13:49 -04:00
Oscar Lorentzon
99c7dd85ce Create polygon tags.
Add support for creating new polygons.
Remove last vertex by clicking it.
Abort creation by clicking original vertext when fewer than 4.
Complete polygon by clicking original vertex.
2016-07-05 08:13:49 -04:00
Oscar Lorentzon
870561c607 Spot tag for visualizing centroid of geometry.
Render spot in DOM to keep orthograpic size when zooming.
2016-05-15 19:53:23 +02:00
Oscar Lorentzon
93ccd256cb Render DOM point at top left corner of created rect.
Abort geometry creation when clicking top left rect point.
Show larger abort indication on hover.
2016-05-12 10:22:32 +02:00
Oscar Lorentzon
48ff3eee57 Set edit elements color according to options. 2016-05-06 15:40:13 +02:00
Oscar Lorentzon
da1ed24135 Separate geometry from tag. 2016-05-06 14:58:09 +02:00
Oscar Lorentzon
ae46971abf Fire tag click events when clicking label. 2016-04-15 19:10:20 +02:00
Oscar Lorentzon
738c0877c1 Do not take pointer events on tag container element.
Remove unused CSS. Use duplicated CSS for mover and resizer classes
together.
2016-04-13 09:21:48 +02:00
Oscar Lorentzon
10a733fd02 Resize in all tag corners.
Base CSS positions on complete canvas instead of tag rect element.
2016-04-08 15:09:45 +02:00
Oscar Lorentzon
37092da09a Keep mover element at centroid of rectangle.
Add centroid property to tag class.
Use centroid to project in DOM renderer.
2016-04-08 14:19:17 +02:00
Oscar Lorentzon
124a7e48f2 Move tags.
Centered CSS element drifts in panos.
Tag operation enum for tracking how rect should be changed.
2016-04-07 17:42:53 +02:00
Oscar Lorentzon
dd27751e71 Show resizer on hover and make it a circle. 2016-04-06 19:50:26 +02:00
Oscar Lorentzon
1693635fa5 Move static tag styles to CSS.
Translate tag label to lower right corner of tag.
2016-04-06 14:41:09 +02:00
Pau Gargallo
1a1041db9a Hide DOM rects 2016-04-06 13:28:20 +02:00