Commit Graph

147 Commits

Author SHA1 Message Date
Joe DF
4a877d60f7 remove unneeded code, not sure how it got there 2022-05-29 21:23:22 -04:00
Joe DF
ca368797b0 restructure again to make less confusing, less duplicate code 2022-05-29 21:18:28 -04:00
Joe DF
d4dfcd2288 fix inconsistent open-close braces, add warn when using element even when id provided 2022-05-29 20:53:11 -04:00
Joe DF
21146b6b2c Merge remote-tracking branch 'cameronbaney/add-element-option-navigator' into patch-for-PR-1303 2022-05-29 20:33:23 -04:00
crydell
9724174a5b
Navigator is matched to viewer when it succeeds 2021-08-11 12:59:14 +02:00
Alistair Buxton
e6725871b8 Make setFlip() update the navigator
Makes setFlip() raise a bounds change, and makes the navigator copy
the image flip in addition to the other properties, when receiving
the bounds signal.
2021-03-26 11:18:21 +00:00
Mark Salsbery
23d00c92c1 Added preventDefault option to MouseTracker handlers: scrollHandler, keyDownHandler, keyUpHandler, keyHandler 2021-03-16 19:35:22 -07:00
Mark Salsbery
033c16ca85 Remember to initialize new properties! Code cleanup... 2021-03-16 11:27:48 -07:00
Mark Salsbery
3947c81726 Added dragToPan to the GestureSettings class, implemented in Viewer 2021-03-16 10:40:36 -07:00
Mark Salsbery
57a98c5ec2 Fixed preventDefaultAction functionality tests, removed unused preventDefaultAction instances from MouseTracker 2021-03-11 20:30:50 -08:00
Mark Salsbery
b07d47011f preventDefaultAction docs 2020-08-14 16:42:06 -07:00
Mark Salsbery
e74d83f104 New preProcessEvent event 2020-08-12 21:22:48 -07:00
Mark Salsbery
d2bb480363 Browser sniffing and pointer events fixes and enhancements 2020-07-24 20:05:39 -07:00
Mark Salsbery
c4351f64e8 stricter linting 2020-06-25 16:01:14 -07:00
Johannes Mueller
5f933b12bb Clear listeners and nodes to avoid memory leaks 2020-06-05 12:27:00 +02:00
Ian Gilman
3fa1068275 Making it possible to manually set the width and height of the navigator 2019-07-26 11:34:33 -07:00
Stefan Weil
0e2f5d49ef Fix some typos in comments (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-09-01 10:59:20 +02:00
Ian Gilman
47e95b4d26
Merge pull request #1416 from francescocretti/hotfix/minimapClick
Navigator minimap onClick vertical/horizontal pan fix
2018-06-29 10:35:41 -07:00
Ian Gilman
7b73768b3b
Merge pull request #1484 from francescocretti/hotfix/minimapDrag
preventDefaultAction in canvas-drag on minimap
2018-06-29 10:26:45 -07:00
Francesco Cretti
9c2211f93c
Merge branch 'master' into hotfix/minimapClick 2018-06-26 14:25:02 +02:00
Francesco Cretti
ed169086e7 Doc minor fix and trailing space removed 2018-06-26 14:07:52 +02:00
Francesco Cretti
0bdc2df8ff Documentations corrected 2018-06-26 13:51:33 +02:00
Francesco Cretti
02ddb7a2f7 preventDefaultAction in canvas-drag on minimap 2018-06-20 18:45:38 +02:00
Francesco Cretti
2eb6eaf52f preventDefaultAction support 2018-06-20 18:07:43 +02:00
evilricio
6c2c5ba498 Add CSS configuration options for the navigator minimap
This patch adds CSS configuration options for the navigator minimap, namely:
- background color
- opacity
- outside border color
- display region border color

If unspecified, the previous default values are kept as default as not to break previous implementations.
2018-06-14 17:38:30 +01:00
Nelson Campos
43d3949dd1 Refactored 90 degrees rotation button's actions. 2018-04-17 11:19:15 +01:00
Nelson Campos
c2fd5322e2 Code cleaning and function calls reorganization 2018-04-12 18:24:11 +01:00
Nelson Campos
84dc60632c code simplification and impro^Cments on toggleFlip function 2018-04-11 18:24:01 +01:00
Nelson Campos
7e5c9e1897 Changes flip store object from viewer to viewport.
More than changing the store object of flip state, the code was simplified and the onFlip function from openseadragon was changed to receive a viewer argument.
TiledImage had a flipped variable wrongly stored.

From now on, flipped state must be read from the viewport object.
2018-04-10 11:51:06 +01:00
Nelson Campos
f65dbd3a39 Changes back showFlipControl and showNavigator variables to false default state 2018-04-09 15:06:29 +01:00
Nelson Campos
6e4012976b Adds two helpers for style formating and updates onCanvasKeyPress method.
There were created a new helper method "setDisplayTransform" to change navigator styling.
Also, a new general function "setElementTransform" was created to help on element styling.

For this commit, I also made some changes on viewer onCanvasKeyPress method:
- r is rotating the image clockwise;
- R is rotating the image counter clockwise;
- Freed "F" keycode to other purposes (like filters or others).
2018-04-06 11:52:10 +01:00
Nelson Campos
71fd747051 Adds flip/mirror slides feature.
This commit adds full support for a new OpenSeaDragon(OSD) feature - Mirror/Flip.
In order to fully support this new feature, the following OSD objects had to be modified:
        - drawer.js:
        - navigator
        - openseadragon
        - strings
        - tiledImage
	- viewer

Additionally, a new flip button was created (similar to the existing ones).

Flip Logic
        Whenever the state is flip button is pressed, flip state is toogled, inverting all the controls and displays (the rotation direction is inverted as well).
        This means that all viewer coordinates (including user inputs) must me inverted too.

Summary of modifications
        - drawer.js: modified _offsetForRotation to invert rotation angle on flipped state. Added a _flip method to scale/mirror canvas context.
        - navigator.js: adds full flip support and inverts nagivator inputs.
        - openseadragon.js: new buttons, flip state variable and showFlipControl variable.
        - strings.js: flip tool help tips.
        - tiledImage.js: flips the actual drawing canvas.
	- viewer.js: Added keyboardshortcuts to rotate 90degrees (r/R) and flip image (f/F). flip button state is stored here and flip order is set.

The flipped state is stored on viewer object.
2018-04-04 16:08:13 +01:00
Francesco Cretti
57654cf1cf raise event for navigator click 2018-03-11 13:24:29 +01:00
Francesco Cretti
12be95c8c3 getCenter fixed when clicking on minimap 2018-03-11 13:05:19 +01:00
Francesco Cretti
027dac0d8e navigato minimap onClick vertical/horizontal pan fix 2018-03-07 11:25:33 +01:00
Cameron Baney
4301254fa0 Allow user to add element option for navigator 2017-09-05 14:05:36 -04:00
Sean Nichols
035f35a26a Synchronize opacity and composite operation of TiledImages in navigator 2017-05-25 12:26:30 -04:00
vin
4eca8aca98 Add timeout for navigator item index change handler. Fix for issue# 1130 2017-05-22 17:20:41 +05:30
Antoine Vandecreme
b62d4a7bc1 Fix navigator with rotation and clip 2017-01-21 19:40:21 +01:00
Antoine Vandecreme
de25b68b43 Add eslint and hound 2017-01-16 21:41:07 +01:00
Adinata Thayib
4eb3864639 Fix navigator doesn't get constrained although viewer have constrainDuringPan options on 2017-01-11 20:11:43 -08:00
Antoine Vandecreme
62c96ebad7 Add clip-change event. 2016-08-28 14:39:14 +02:00
Ian Gilman
ea32e1b090 Merge pull request #935 from leesei/master
feat(navigator): add option autoFade
2016-05-16 09:40:23 -07:00
leesei
7ea8733e5b feat(navigator): add option autoFade 2016-05-07 17:16:59 +08:00
Antoine Vandecreme
521e020b9a Viewport getBounds and fitBounds methods now take rotation into account. Fix #924 2016-05-04 22:26:33 -04:00
Antoine Vandecreme
18b101ccf5 Fix navigator not rotated when viewport rotation set in constructor. 2016-02-09 19:20:52 -05:00
Hiroaki ENDOH
27c91204b6 Refactor to reflect the reviewer comments
See also:
https://github.com/openseadragon/openseadragon/pull/807#discussion_r48447403
2015-12-27 12:15:17 +09:00
Hiroaki ENDOH
fb222d9fe9 Fix issue that rectangle can't move to clicked destination on navigator.
This issue can reproduce by these steps.
1. Open http://localhost:8000/test/demo/coordinates.html
2. Click Rotate button
3. Click canvas of navigator
2015-12-26 00:41:40 +09:00
Ian Gilman
c7db21f8b4 Merge pull request #796 from avandecreme/rotation
Fix coordinates conversion with rotation.
2015-12-23 09:20:40 -08:00
Antoine Vandecreme
ebbf4ea4a0 Rename scale functions with NoRotate suffix. 2015-12-22 18:19:22 -05:00