Commit Graph

403 Commits

Author SHA1 Message Date
Hernán Cervera
c639dd15e3 Provide a static method in OpenSeadragon to get an existing viewer
From limited testing, this method allows retrieval even when the viewer
was instantiated in a different file.

OpenSeadragon keeps internal private state in _viewers, following the
convention of the underscore prefix for private members.
2021-06-29 19:14:46 -05:00
Tammy DiPrima
1ca9b16158
correction
difference; not destination
2021-06-22 14:52:06 -04:00
Tammy DiPrima
ef297a2c2c
Reference globalCompositeOperation doc
Fixes openseadragon/openseadragon#1994
2021-06-22 12:32:59 -04:00
Mark Salsbery
40623f1e99 Re-added the OpenSeadragon.setElementPointerEventsNone() function 2021-05-05 12:43:53 -07:00
Mark Salsbery
00187cb5a1 Fixed legacy mouse and touch event handling 2021-05-03 11:38:20 -07:00
Ian Gilman
0a78916ff7
Merge pull request #1937 from ronnymikalsen/1763-a11y-browser-zoom
fix(a11y): draw the level based on pixel density ratio
2021-03-26 13:44:24 -07:00
Mark Salsbery
f99c9a8a4f Merge branch 'master' into ms-gesturesettings
* 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
2021-03-16 12:04:58 -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
Waylon Peng
1ccefd9f6a Update jsdoc, replace Object.assign with $.extend 2021-03-15 16:20:26 -07:00
Waylon Peng
54721608a4 Create setImageFormatsSupported function 2021-03-12 23:03:18 -08:00
ronnymikalsen
89d4499c2f Merge branch 'master' into 1763-a11y-browser-zoom 2021-03-12 10:21:42 +01:00
rmontroy
515a155cf6 Remove support for IE < 11 2021-03-10 13:48:09 -05:00
Mark Salsbery
6fa083d2e0 Remove support for IE < 11 (#1863) 2021-03-08 13:33:05 -08:00
Mark Salsbery
ce098f889c Added additional documentation for the zoomPerSecond viewer option 2021-02-10 08:51:17 -08:00
ronnymikalsen
e7497272fa fix: comment 2021-02-05 12:32:13 +01:00
ronnymikalsen
eb113662e8 refactor: cleanup code 2021-02-05 11:48:08 +01:00
Mark Salsbery
f38e0c7967 diff review cleanup 2020-08-14 22:03:23 -07:00
Mark Salsbery
3769af532b Fixed tests to account for #1459 fix (fire drag-end event even if pointer didn't move) 2020-08-13 19:56:22 -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
Ian Gilman
c01887f3e3 Updated NPM packages 2019-12-30 10:46:44 -08:00
aplave
0953bb4be8 Move $.console declaration up so $.Browser can make use of it 2019-12-22 10:33:15 -08:00
aplave
f7f2f501f5 Wrap URL parameter decoding in try-catch for safety 2019-12-22 10:32:17 -08:00
Jay Smith
d9271a69a4
Correct gestureSettingsPan typo in docs
gestureSettingsPan.zoomToRefPoint
to
gestureSettingsPen.zoomToRefPoint
2019-10-03 14:47:16 +10:00
Stefan Weil
e3775acbe0 Fix typo in comment
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-09-01 14:34:14 +02: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
Jonathan Lake
2dd8a65e63 Adds option to set rotation increment for nav buttons and keyboard; Issue 1518 2018-08-21 17:39: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
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
Ian Gilman
e01e36794d
Merge pull request #1441 from nelsonn3c/feature/flip
Adds flip/mirror slides feature.
2018-06-07 09:48:59 -07:00
Ian Gilman
24be785bbd Updated to latest packages (and fixed lint errors) 2018-05-11 10:53:16 -07: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
7c7d714839 Changes back default state values 2018-04-09 15:09:29 +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
schueffp@mskcc.org
4889d63534 removed trailing spaces error 2018-03-16 11:44:42 +01:00
schueffp@mskcc.org
85d8d9ee32 Added option zoomToRefPoint for all gestureSettings
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.
2018-03-16 11:29:16 +01:00
Jan Hudecek
5ddcfa438e Added option pixelsPerArrowPress that sets the speed of movement by arrow keys 2017-12-14 17:10:10 +01:00
Peter
f268607b54 more colors for the default case and added documentation. 2017-07-31 17:36:25 -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
b0ed8444c1 Removed Doc comment for OpenSeadragon function 2017-07-18 16:39:43 -07:00
John Hoffer
1ae3a9b961 Merge branch 'master' into master 2017-05-30 12:58:05 -04:00
Ian Gilman
52525f6697 Changelog for #1200 and comment tweak 2017-05-19 10:06:48 -07:00
Ian Gilman
8fe682f966 Merge pull request #1200 from LarissaSmith/master
Clamp device pixel ratio to a minimum of 1 for calculating pixelDensi…
2017-05-19 10:02:50 -07:00
larissasmith
23cba35ea0 Clamp device pixel ratio to a minimum of 1 for calculating pixelDensityRatio.
A lower value can cause tile drawing issues.
2017-05-18 15:17:02 -06:00
Mark Allen Matney, Jr
77da306397 Enable configuration of ImageJob timeout 2017-05-11 21:36:27 -07:00
Sean Nichols
11157999eb Remove use of Object.keys and Array.prototype.forEach for IE8 compatibility 2017-05-05 15:37:33 -04:00
Sean Nichols
6fdf81f266 Ignore falsy header values and improve ajaxHeaders documentation 2017-05-05 15:37:33 -04:00
Sean Nichols
15fe35a589 Improve documentation and option/argument names 2017-05-05 15:37:33 -04:00
Sean Nichols
ddab768696 Add options for loading tiles via AJAX and custom AJAX request headers. 2017-05-05 15:37:33 -04:00
Antoine Vandecreme
de25b68b43 Add eslint and hound 2017-01-16 21:41:07 +01:00
thejohnhoffer
0a44585457 documentation of opacity and preload relations 2016-11-03 22:39:00 -04:00
thejohnhoffer
bac2cab8e9 document tiledImage.preload 2016-11-02 20:45:33 -04:00
Antoine Vandecreme
65b59c08d6 First draft of tiled image rotation. 2016-08-17 15:43:08 +02:00
Artem Kozlov
9ef153ca53 Add support for commonjs. 2016-07-25 20:35:49 +02:00
Sebastian Öberg
fb5e628add Moved setting of withCredentials to after the request is opened to fix IE 10 bug. 2016-06-22 14:34:21 +02:00
plougsgaard
e9a0bbc8d9 Document effect on smoothTileEdgesMinZoom referencing #952. 2016-06-17 19:16:08 +02:00
plougsgaard
b3a10aca3b Introduce variable iOSDevice that disables 8c4fcc9 when running on an iOS device. 2016-06-17 16:37:30 +02:00
leesei
7ea8733e5b feat(navigator): add option autoFade 2016-05-07 17:16:59 +08:00
Ian Gilman
766e2b0e1f Merge pull request #902 from avandecreme/dead-code
Remove dead code.
2016-04-15 16:55:57 -07:00
Antoine Vandecreme
55e0811294 Merge remote-tracking branch 'upstream/master' into doc 2016-04-10 18:37:11 -04:00
Antoine Vandecreme
4fa7ed1590 Adapt doc to new version of JSDoc. 2016-04-09 10:15:02 -04:00
Antoine Vandecreme
bd4cabaec2 Fix JSDoc. 2016-04-05 20:00:35 -04:00
Antoine Vandecreme
55dfc146c9 Remove dead code. 2016-04-03 07:59:10 -04:00
Antoine Vandecreme
ffbb8b2cfe Add support of overlays rotation on IE9. 2016-03-30 11:16:29 -04:00
Antoine Vandecreme
9c461824b3 Update OpenSeadragon.Placement to be serializable. 2016-03-22 15:50:48 -04:00
Mei-Hui Su
c214e2f0c4 change option compositeOperation default to null instead of 'source-over' 2016-01-19 14:17:52 -08:00
Mei-Hui Su
3cfe8ecac2 Merge https://github.com/openseadragon/openseadragon 2016-01-14 12:32:54 -08:00
Mei-Hui Su
087507c823 1) update according to comments from openseadragon's 2016-01-07 12:47:17 -08:00
Mei-Hui Su
ea833a780c Update to allow setting of globalCompositeOperation when
html <canvas> is used to process multiple tiledImages to blend
is a specific way.
(special handling,
   when compositeOperation is 'source-over' and opacity is 1,
   useSketch is false, otherwise useSketch is true
)
Valid values are 'source-atop', 'source-in', 'source-out',
  'destination-over', 'destination-atop', 'destination-in',
  'destination-out', 'lighter', 'copy' or 'xor'
http://www.w3schools.com/tags/canvas_globalcompositeoperation.asp
2016-01-06 07:58:36 -08:00
Petar Petrov
7406727090 Merge branch 'master' of https://github.com/openseadragon/openseadragon 2015-11-16 16:44:31 +02:00
Ian Gilman
b3b1a32717 Merge pull request #760 from avandecreme/imagetilesource
Add ImageTileSource. Fix #467
2015-11-11 10:32:09 -08:00
Petar Petrov
515c15bf98 various fixes for edge smoothing - #755 2015-11-05 16:19:56 +02:00
Petar Petrov
8c4fcc9ca9 tile edge smoothing at high zoom - #755 2015-11-04 17:04:50 +02:00
Antoine Vandecreme
14a83e1154 Add IE8 support in ImageTileSource. 2015-11-02 18:35:11 -05:00
Grant Echols
40edbd7a1c Updates as per code review requests 2015-10-28 17:07:51 -06:00
Grant Echols
ad4bbb9daf Changed name of config parameter to include 'MS' to suggest milliseconds. 2015-10-27 15:33:39 -06:00
Grant Echols
19c6179533 Added a patch to help slow down the scroll devices that fire too fast. This new code reduces the number of 'canvas-scroll' events that fire and slows down the zoom process. 2015-10-27 14:00:45 -06:00
Larissa Smith
fc8b4db796 Fix for Chrome (v 45) issue that key is sometimes undefined outside of the for-in loop. 2015-09-17 15:45:39 -06:00
Ian Gilman
b07e4b200a Merge pull request #719 from Emigre/umd
registers an AMD module if possible
2015-09-14 13:54:27 -07:00
Ian Gilman
9f2a2f361d Changelog for #711 2015-09-03 09:24:15 -07:00
Gaspar Rey
f799a1fe86 Add 'define' as a global in JSHint 2015-09-03 00:35:43 +01:00
Gaspar Rey
00459189b1 Define as an AMD module if available 2015-09-02 00:10:53 +01:00
Ian Gilman
bc6759e7fb Merge pull request #696 from avandecreme/master
Avoid using eval when JSON.parse is available.
2015-07-31 09:34:16 -07:00
Antoine Vandecreme
4bb80067f7 Avoid using eval when JSON.parse is available. 2015-07-30 16:21:59 -04:00
Hasse Feldthaus
8e591d1108 Renamed ambiguous event label. 2015-07-29 18:27:23 +02:00
Hasse Feldthaus
29d5401eed Added some missing semicolons. 2015-07-29 18:19:45 +02:00
Hasse Feldthaus
565e7cd097 Added XDomainRequest as fallback method for ajax, if XMLHttpRequest fails. 2015-07-29 17:19:08 +02:00
Larissa Smith
339401683f Added configuration parameter to allow a horizontal layout that has a fixed number of columns or a vertical layout that has a fixed number of rows. 2015-07-02 13:20:57 -06:00
Grant Echols
0806e4d4ed Fixed comment regarding autoResize. 2015-06-25 14:14:05 -06:00
Grant Echols
df878f6f82 Changed preserveImageSizeOnResize to require autoResize=true.
Refactored resizing code to share more code.
Removed preserveImageSizeOnResize parameter from viewer.
2015-06-24 10:48:00 -06:00
Grant Echols
fb21dabd76 Added configuration parameter: preserveImageSizeOnResize to preserve the default behavior.
Changed fitBounds to fitBoundsWithConstraints as per Ian's instructions.
2015-06-23 10:55:57 -06:00
Antoine Vandecreme
9d053c545b Fix Ian's comments. 2015-04-20 19:25:36 -04:00