Commit Graph

214 Commits

Author SHA1 Message Date
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
efc9098ce4 Make setting of globalCompositeOperation optional in drawer.js 2016-01-19 11:49:04 -08:00
Mei-Hui Su
e89d1f4c97 fix couple of typos 2016-01-14 12:42:02 -08:00
Mei-Hui Su
3cfe8ecac2 Merge https://github.com/openseadragon/openseadragon 2016-01-14 12:32:54 -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
Antoine Vandecreme
ebbf4ea4a0 Rename scale functions with NoRotate suffix. 2015-12-22 18:19:22 -05:00
Antoine Vandecreme
52f8ad6aa2 Fix coordinates conversion with rotation. 2015-12-11 19:07:23 -05:00
Petar Petrov
8bee1e7b8b doc tweak for edge smoothing changes - #755 2015-11-06 08:55:30 +02: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
Serge Markin
11024f44f2 FIXED: Rotation works improperly on retina display #683 2015-08-20 20:11:30 +08:00
Antoine Vandecreme
dd07771415 Fix drawer.clear 2015-04-22 18:30:49 -04:00
Antoine Vandecreme
9d053c545b Fix Ian's comments. 2015-04-20 19:25:36 -04:00
Antoine Vandecreme
44395662d1 Add opacity support. 2015-04-19 16:10:37 -04:00
Philip Giuliani
0d056145a3 💄 Rename to drawRectangle 2015-04-15 18:31:56 +02:00
Philip Giuliani
9df77ee915 Return early in drawDebugInfo 2015-04-15 13:40:12 +02:00
Philip Giuliani
21d32b59f5 Pass tiledImage and context to the placeholderFillStyle function 2015-04-15 13:32:41 +02:00
Philip Giuliani
6677953d87 Save and restore inside of the drawer 2015-04-13 19:05:23 +02:00
Philip Giuliani
ff6e604b94 Add comment 2015-04-10 16:20:54 +02:00
Philip Giuliani
1a230d8b9f Add viewportToDrawerRectangle to Drawer 2015-04-09 19:57:28 +02:00
Philip Giuliani
da819ac15a Add possibility to draw gradients and images 2015-04-09 14:25:07 +02:00
Philip Giuliani
4523454ff1 Add option to define the fillStyle of the placeholder 2015-04-09 13:44:55 +02:00
Philip Giuliani
fc56c4e2ef Add method to draw a placeholder 2015-04-08 20:13:56 +02:00
Ian Gilman
c27f68640f Docs for clip feature, as well as get and set 2015-03-19 16:38:52 -07:00
Ian Gilman
e1d36ffb14 First version of clip feature 2015-03-18 10:03:44 -07:00
Wesley Fok
65c8ed6f36 drawDebugInfo is now high-dpi aware 2015-02-03 14:45:39 -05:00
unknown
3402d33088 WIP basic high pixel density support re: openseadragon/openseadragon#541 2015-01-29 11:19:49 -05:00
Ian Gilman
6a7f56d858 tiledImage bounds animation now works 2014-12-02 11:44:02 -08:00
Ian Gilman
bf9ccd5458 tile-drawing event now includes tiledImage 2014-11-24 13:25:20 -08:00
Ian Gilman
36831d3434 Testing deprecations 2014-11-20 16:02:02 -08:00
Ian Gilman
3449ba1961 tiledImage tests 2014-11-18 17:12:15 -08:00
Ian Gilman
7fcdbf210e One extra merge conflict 2014-11-07 17:15:11 -08:00
Ian Gilman
30a1005fb8 Merge branch 'master' into merger
fixed Conflicts:
	src/drawer.js
2014-11-07 17:13:48 -08:00
Ian Gilman
fab33ea1af Merge branch 'imageLoaderPatch' of github.com:rdlester/openseadragon into rdlester-imageLoaderPatch
fixed Conflicts:
	src/drawer.js
2014-11-07 15:29:34 -08:00
Ian Gilman
d346d165f8 Updated documentation 2014-11-04 11:53:39 -08:00
Ian Gilman
46cd2ab800 Fixed issue with top/left margins; cleaned up naming 2014-10-21 17:11:09 -07:00
Ian Gilman
2a7f48ef60 Cleanup and docs for margins 2014-10-16 15:19:05 -07:00
Ian Gilman
2d8652046a First stab at margins 2014-10-16 14:00:07 -07:00
Dominik Picheta
ea80c05a05 Replace error for non right-angle rotations in Rect.rotate. 2014-08-20 09:21:02 +01:00
Dominik Picheta
1c63c96f04 Increase viewport bounds slightly for rotation. 2014-08-19 15:56:23 +01:00
Dominik Picheta
e00e4c53ef Proper viewport bounds changes for rotation. 2014-08-19 09:51:27 +01:00
Dominik Picheta
50f9a82089 Small rotation fixes. 2014-08-15 15:47:50 +01:00
Dominik Picheta
3353bd5f69 Support other rotation angles. 2014-08-13 15:52:20 +01:00
Ian Gilman
66b8d7e191 Previous cleanup was a little too aggressive. 2014-08-12 16:15:17 -07:00
Ian Gilman
45b7118732 Further cleanup 2014-08-11 17:04:20 -07:00
Ian Gilman
f04d538b5b Deprecated layer functions in viewer; additional cleanup. 2014-08-08 16:15:23 -07:00
Ian Gilman
d86edff931 Merge branch 'collections' into ian
fixed Conflicts:
	src/drawer.js
2014-08-08 11:38:13 -07:00
Ian Gilman
82637d95a5 Merge branch 'master' into collections 2014-08-08 11:32:14 -07:00
Dominik Picheta
a2334353f7 Merge branch 'master' into fix-195 2014-08-08 12:19:48 +01:00
Dominik Picheta
29b69a9e83 Fixes #195: debug feature now works with rotation. 2014-08-08 12:18:05 +01:00
Ian Gilman
dbb60c0ab2 Splitting drawer into drawer/tileCache/tiledImage; adding World 2014-08-06 13:48:18 -07:00
Ian Gilman
48603ba260 Drawer creation now supports width or height rather than scale. 2014-07-31 15:54:20 -07:00
Ian Gilman
298bcc25fb Merge branch 'master' into ian 2014-07-30 09:26:15 -07:00
Rob Sanderson
984fb8c531 Fixed drawer, renamed source, fixed tests 2014-07-28 11:53:06 -07:00
Ian Gilman
a3973a25e7 Added scaling to drawer. 2014-07-22 11:13:22 -07:00
Ian Gilman
ea6ee54136 Added x and y to drawer. 2014-07-17 16:24:28 -07:00
Ryan Lester
43f8dc74ea Fixing CORS bug 2014-06-26 11:33:43 -07:00
Henri Astre
a563bdb658 fix .close() called after .destroy() + spacing 2014-06-18 10:35:23 -07:00
Henri Astre
764fa3e34a Fix memory leak while destroying the viewer. 2014-06-17 17:26:10 -07:00
Ryan Lester
06dcfadf20 Quick patch to fix mid-update image loaded callbacks 2014-05-21 18:29:40 -07:00
Ryan Lester
dd51df97ab Added ImageLoader; loads batches of images using async queue pattern 2014-05-10 15:09:02 -07:00
Antoine Vandecreme
dbe87d659e Disable CORS by default. 2014-04-07 16:59:48 -04:00
Antoine Vandecreme
37bc36a7e7 Fix missed copy paste. 2014-03-26 15:28:35 -04:00
iangilman
184ba0dbea Merge pull request #364 from sul-dlss/cors-policy
add crossOriginPolicy drawer configuration to enable or disable CORS image requests
2014-03-21 09:18:41 -07:00
Chris Beer
3d028716fe add crossOriginPolicy drawer configuration to enable or disable CORS image requests 2014-03-20 10:30:46 -07:00
Antoine Vandecreme
ba10c392a1 Merge branch 'master' into layers
Conflicts:
	src/drawer.js
	src/viewer.js
	test/test.html
2014-03-19 16:24:48 -04:00
Antoine Vandecreme
c9df575347 Merge from master 2014-03-18 13:17:43 -04:00
Antoine Vandecreme
41cded608c Use viewer.addOverlay instead of drawer.addOverlay in collection mode 2014-03-15 11:40:51 -04:00
Grant Echols
95f0591210 Added message to clarify that the event only fires when <canvas> is being used. 2014-03-04 10:38:10 -07:00
Antoine Vandecreme
0f43cd5a16 Add deprecated drawers methods. 2014-03-01 08:32:38 -05:00
Grant Echols
be79249c9c Added pre-draw event for tiles to allow applications to alter the image just prior to its rendering. This should enable invert, brightness, contrast, sharpen and other transformations to occur naturally through the 'tile-drawing' event listener.
The listener is given the 'rendered' object which is the pre-drawn image on a canvas context object. By altering the 'rendered' object the listener can alter the display results. Since this event gets fired multiple times for the tile, it is wise for the handler to track what their desired modifications are and to tag the 'tile' element to keep track of the modifications already applied.
2014-02-27 15:35:00 -07:00
Antoine Vandecreme
365dad9317 Move all overlay code from drawer to viewer 2014-01-30 15:38:37 -05:00
Sean Wilkinson
a5a72ee321 Set image.crossOrigin = 'Anonymous'; to avoid tainted canvas problem 2013-12-11 19:31:35 -06:00
Antoine Vandecreme
0c2af6550a Add support to add/remove layers and change their levels. 2013-12-09 09:26:36 -05:00
Mark Salsbery
930e8c4dfd Updated Doclets 2013-11-25 08:48:44 -08:00
Mark Salsbery
ece76925a6 Updated Doclets
Lots of changes, most notably event documentation (@event and @fires)
2013-11-21 12:19:07 -08:00
Mark Salsbery
54049927f0 Updated doclets
Changed event docs:
Changed userData properties from optional to nullable.
Removed optional type from preventDefaultAction properties.
2013-11-18 06:56:32 -08:00
Mark Salsbery
70b91d57ec Updated doclets for jsdoc3
Updated so jsdoc3 parser picks everything up.
Added event docs.
Lots of documentation content needed...
2013-11-15 22:19:53 -08:00
Mark Salsbery
5c4131303a Use canvas when available - Fixes
Removed redundant useCanvas property from drawer
2013-11-07 11:48:01 -08:00
Mark Salsbery
085c7f2ecb Use canvas when available - Fixes
Updated documentation doclet.
Enclosed detection code in a function.
Eliminated the Drawer USE_CANVAS global and replaced it with a
Drawer.useCanvas instance variable.
2013-11-01 13:02:28 -07:00
Mark Salsbery
e209846ac1 Use canvas whenever possible (#191)
Drawer uses an HTML5 canvas element if it's available.

Viewer.useCanvas can be used to override (default is true).
2013-11-01 10:19:47 -07:00
Antoine Vandecreme
4cd98a5da9 Check hash in viewer constructor.
Fix #229
Fix #176
2013-10-12 18:30:05 -04:00
Mark Salsbery
d574700b3d Event Handler Signatures Changed to 'fn(event)'
All event handler signatures changed to 'fn(event)'
eventSource property added to the event object passed
Redundant event source properties removed ('button' and 'viewer'
Documentation updated in MouseTracker
changelog.txt updated
2013-10-10 17:00:15 -07:00
iangilman
aefe7f3610 Merge pull request #185 from robhobbes/master
Adding partial support for rotation.
2013-08-20 11:08:58 -07:00
Robert Hickman
767c897e7f Revisions to rotate after second code review. 2013-08-16 11:32:21 -06:00
Robert Hickman
54e8d8c43f Fixes made after first code review of rotation. 2013-08-15 16:15:20 -06:00
Ian Gilman
6669589e5e Drawer now works when the page is rtl 2013-08-15 12:54:32 -07:00
Robert Hickman
6c63710131 Rotating overlays. 2013-08-14 13:43:49 -06:00
Robert Hickman
b9583c43ac Working on rotating images.
So far only 90 degree rotation is supported.
Only the image is currently being rotated.
Overlays, debugger, and the navigator still need to be updated to support rotation.
2013-08-13 16:32:04 -06:00
Luke Murray
2717398181 Use the correct onDraw in drawer.js. Remove imageFullSize and fix up the comment for onDraw 2013-08-01 13:36:00 +10:00
Luke Murray
4239bb7adc fix: remove the useTransform/SVG stuff and move back to a simple onDraw callback only so people can handle their own custom drawing and sizing 2013-07-31 17:01:48 +10:00
Luke Murray
df877493a9 Rename drawHandler to onDraw. Also make it a notification style callback
(does not override the draw functionality).
Add an overlay option 'useTransform' that will transform the overlay
element instead of moving it's postion - useful for SVG elements
2013-07-16 12:04:37 +10:00
Luke Murray
233c3a357a Add the option for a zoom handler callback 2013-07-12 16:51:56 +10:00
iangilman
8fe0ce26b8 Merge pull request #136 from acdha/jshint-cleanup
JSHint tidying
2013-06-26 09:37:08 -07:00
Ian Gilman
3f1072b321 Fixed typos in comments 2013-06-26 09:15:37 -07:00
Chris Adams
c648c1df8a drawer: don't leak drawLevel into global namespace
This code is still under-tested and documented but no longer relies on
`drawLevel` being leaked into the global namespace where `updateLevel`
to find it.

See #145
2013-06-25 14:26:09 -04:00
Kevin Ewing
248852c15f Implementing OpenSeadragon.now()
Replacing both `+new Date()` and `new Date().getTime()` with `$.now()`
2013-06-20 13:15:04 -07:00
Chris Adams
e2bea810e3 Replace gnarly ternary expression with if statement 2013-06-20 15:12:53 -04:00
Chris Adams
643ee211ca Remove unused variables
Mostly unused function arguments but there were also a fair number
of legacy names which are now no longer used.

One question which comes up – mostly in tilesource.js – is whether
there is any value in leaving unused variables for functions which
are intended to be overridden anyway. I'm inclined to say that the
docs + tests need to be sufficient as there's no enforcement that
whatever is in the base implementation will actually be followed by
any of the real functions.
2013-06-20 15:12:53 -04:00
Chris Adams
9f6f164d9f Remove all whitespace
The results of running this command::

    find . -name \*.js -print0 | xargs -0 perl -p -i -e "s|[ \t]+$||"

(Split from #136)
2013-06-19 13:33:27 -04:00