Commit Graph

226 Commits

Author SHA1 Message Date
Shyamkumar Yadav
5baa8d3252
docs: change @return -> @returns 2022-10-10 01:12:18 +05:30
Ian Gilman
d3ef767487
Merge pull request #2136 from jonasengelmann/master
Viewport rotation animation
2022-08-23 14:13:22 -07:00
Aiosa
bb1755613e Merge branch 'master' of https://github.com/openseadragon/openseadragon into openseadragon-master
# Conflicts:
#	src/tiledimage.js
2022-06-28 14:11:02 +02:00
Jirka
4f79f29238 Move cache creation, image downloading process and transparency deduction to the TileSource instance to allow custom data fetching, caching, processing. 2022-04-16 21:19:54 +02:00
jonasengelmann
8519e30a3a added viewport rotation animation 2022-03-29 16:50:18 +02:00
Sebastien ROBERT
3fa67c317b Moved _shouldRoundPositionAndSize Drawer class member to drawTile() function argument 2021-12-22 14:16:11 +09:00
Sebastien ROBERT
e5b608d86a Extends the fix for seams in transparent images to any browsers, making it configurable 2021-12-13 14:20:11 +09:00
Mark Salsbery
e74d83f104 New preProcessEvent event 2020-08-12 21:22:48 -07:00
Mark Salsbery
c4351f64e8 stricter linting 2020-06-25 16:01:14 -07:00
Ian Gilman
4c64042bac JSDoc fixes 2020-03-05 10:29:08 -08:00
Yansong Hong
b4bf21cda8 1540 Use strict equality instead of loose equality 2020-02-07 13:16:09 -08:00
Yansong Hong
dadef91ce0 1540 Address reviewer comment to better document viewportCoordToDrawerCoord function 2020-02-07 13:15:03 -08:00
zero41120
2d971af445 1540 Add feature to crop tiledImage with multiple polygons 2020-02-06 13:46:14 -08:00
Baltazar Gomez
70b2834839
remove deprecated imageSmoothingEnabled prefixes 2019-11-18 16:21:07 -07:00
yellowtailfan
378c2a160c Fixed: window resize was resetting image smoothing. 2019-04-19 16:26:41 +10:00
yellowtailfan
1d3a1e0ccf Set image smoothing options on sketch canvas. 2019-04-18 13:08:05 +10:00
Yochay Doutsh
712e3d8dd1 Moved property from prototype to constructor and renamed private function 2019-02-10 14:57:35 +02:00
Yochay Doutsh
ef068e9229 split setImageSmoothingEnabled into private and public parts, change floor to round 2019-02-07 11:40:34 +02:00
Yochay Doutsh
1e538e665d imageSmoothingEnabled is being set to correct value after resize 2019-02-06 17:47:07 +02:00
Yochay Doutsh
578ff36a06 WIP: _calculateCanvasSize outputs are floored, but imageSmoothingEnabled is still initalized on resize 2019-02-06 16:04:33 +02:00
Nelson Campos
dc8331e641 Clean unnecessary code.
Clean tiled image's flip property and methods.
2018-10-19 15:49:27 +01:00
Nelson Campos
4fe5a84170 Fix flipped debug drawing context 2018-10-18 15:29:08 +01:00
Nelson Campos
2670f62892 Fix navigator flip transformation
Flip transformation wasn't correctly applied on navigator for all images when its tileSource is flipped by default.
2018-10-18 12:04:52 +01:00
Nelson Campos
132c68c8bb Create getFlip function to retrieve tiledImage flipped state 2018-10-17 12:45:10 +01:00
Nelson Campos
7a7ba07902 Moved flip call to the end of drawTiles method. Just code backup 2018-10-02 16:57:31 +01: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
Peter
9511cf2d00 Removed save/restore for canvas 2018-08-10 03:46:25 -04:00
Peter
d892dcfbc7 Repaired Minor issues 2018-08-08 20:05:46 -04:00
Peter
9968025782 Simplified imageSmoothingEnabled Option. The option can be set during viewer creation and also later with the function viewer.drawer.setImageSmoothingEnabled(). 2018-08-03 18:47:16 -04:00
Peter
17e25c0428 Revert "Added switch to smoothly or unsmoothly render images on the canvas: imageSmoothingEnabled (true (default), false). Medical images can thus be displayed in more pixelated, unsmoothed manner."
This reverts commit 19f7b80dca.
2018-08-03 17:29:48 -04:00
Peter
19f7b80dca Added switch to smoothly or unsmoothly render images on the canvas: imageSmoothingEnabled (true (default), false). Medical images can thus be displayed in more pixelated, unsmoothed manner. 2018-07-30 20:00:58 -04: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
Peter
910eaf6da6 changed indexOfImage to colorIndex 2017-07-31 17:43:10 -04:00
Peter
6265d389b9 remove BOM 2017-07-31 17:05:18 -04:00
Peter
175463a0f6 different colors for different tiled images in debug mode.
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.
2017-07-26 10:57:17 -04:00
Ian Gilman
d71ceebd72 Fixed issue with transparent images disappearing on Safari 2017-06-15 17:28:04 -07:00
Antoine Vandecreme
63a8a2ffa6 Allow tiled image rotation outside the 0 to 360 range 2017-01-21 20:13:32 +01:00
Antoine Vandecreme
fc69c6568d Animate rotation 2017-01-21 19:40:21 +01:00
Antoine Vandecreme
de25b68b43 Add eslint and hound 2017-01-16 21:41:07 +01:00
Antoine Vandecreme
43bd0e972f Fix sketch canvas not resizing properly. Fix #973 2017-01-08 11:13:32 +01:00
Ian Gilman
eb8b9ccd50 Merge pull request #1006 from avandecreme/master
Tiled image rotation
2016-10-26 09:58:12 -07:00
Antoine Vandecreme
4b48717010 Rollback sketchCanvas scaling when tiled image rotated 2016-10-25 21:41:42 +02:00
Antoine Vandecreme
5ac1502ccd Take pixelDensityRatio into account when rotating 2016-10-24 22:03:31 +02:00
Antoine Vandecreme
2821c8f67b Partialy fix edge smoothing. 2016-10-06 22:18:32 +02:00
A
e38c53ff31 Use canvas instead of sketchCanvas 2016-09-23 16:19:08 -04:00
A
c24e8ceedf Fix IndexSizeError on IE and Edge #1033
Internet Explorer and Microsoft Edge throw IndexSizeError when you call context.drawImage with negative x or y or width or height greater than the canvas width or height respectively.
2016-09-23 15:57:35 -04:00
Antoine Vandecreme
2e3f57401f Fix tiles missing with rotation + rotate around center 2016-08-28 12:10:35 +02:00