* master:
Added changelog for #1954 and bumped upcoming version to 3.0.0
Update jsdoc, replace Object.assign with $.extend
Create setImageFormatsSupported function
# Conflicts:
# changelog.txt
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.
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).
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.
This is an option for different applications or user preferences:
If zoomToRefPoint in a gesture setting is true (default), the zoom is
centered at the pointer position. Otherwise, the zoom is centered at the
canvas center.
If there are multiple tiled images as overlay, it might be important to
see how they are loaded. Different colors in the debug mode for the
different tiledImages visualize that. DebugGridColors have to be given
as a sting array with a color for each tiledImage. However, shorter
arrays will be recycled without error. Also, single strings are treated
as single entry arrays, for backwards compatibility.