Commit Graph

128 Commits

Author SHA1 Message Date
Sharpbarb
7aac7ffd9c Update openseadragon.js
Align initialPage value
2013-10-10 12:05:05 -07:00
Sharpbarb
81664251cc Update openseadragon.js
Missing colon
2013-10-09 15:22:36 -07:00
Sharpbarb
fc972df52e Update openseadragon.js 2013-10-08 14:53:08 -07:00
Ian Gilman
6396fe1504 Merge branch 'Original-Events-In-Handlers' of github.com:msalsbery/openseadragon into msalsbery-Original-Events-In-Handlers
Fixed Conflicts:
	changelog.txt
2013-09-24 10:28:46 -07:00
Mark Salsbery
13415b36f3 MouseTracker Original Events in Handlers
Misc name changes, indentation/whitespace fixes.
Still TODO: Fix documentation, evaluate presence of key handler in a
mouse tracker, evaluate whether isTouchEvent flag should be in all
eventData objects or not.
2013-09-09 14:27:58 -07:00
Mark Salsbery
56f5b9fb74 MouseTracker Original Events in handlers
Comment & Formatting fixes
2013-09-06 10:43:39 -07:00
Mark Salsbery
b3fa8f1184 MouseTracker original events in handlers
Implemented "Expose original event in handlers" (#23) for MouseTracker

Added OpenSeadragon.getElementOffset() method. Element-relative mouse
coordinates should be correct even if the element and/or page is
scrolled (#131)
2013-09-05 17:20:17 -07:00
Chris Adams
1b6cf93474 Graceful handling of IE cross-domain AJAX failures
Prior to IE 10, XmlHttpRequest cannot be used for requests to a
different origin even when the target URL's CORS headers would allow
access (see http://caniuse.com/#feat=cors).

This is easy to miss in testing if you use a single origin during
testing but have a CDN or domain-sharding for production and will break
the error handler function passed to makeAjaxRequest() if that code
assumes it can access properties on the request object.

This adds a more informative pointer to Microsoft's documentation when a
security exception is raised.
2013-08-29 16:13:18 -04:00
Robert Hickman
54e8d8c43f Fixes made after first code review of rotation. 2013-08-15 16:15:20 -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
Ian Gilman
7391561dcd OpenSeadragon.now() returned undefined the first time; fixed 2013-07-10 09:31:22 -07:00
Chris Adams
9de45ba281 Refactor OpenSeadragon.makeCenteredNode
* Use CSS display tables for vertical centering (tested back to IE8)
* Use the DOM instead of string concatenation
* Remove redundant styles ($.makeNeutralElement sets the same values
  for margin, padding & border)
* Return the outer wrapper element to ease DOM addition & removal
2013-06-28 15:52:48 -04:00
Chris Adams
7f42dfc032 code style 2013-06-28 15:01:56 -04:00
Chris Adams
fb7c91acd2 code style 2013-06-28 14:54:44 -04:00
Chris Adams
464428cef7 makeAjaxRequest: don't set request to null
Setting onreadystatechange can avoid the possibility of it somehow being
called twice but there's no point in nulling the request right before we
let the GC collect it.
2013-06-28 14:00:02 -04:00
Chris Adams
db38b71dd9 makeAjaxRequest: throw error for missing callback 2013-06-27 16:03:43 -04:00
Chris Adams
1c6a57c710 makeAjaxRequest: log all errors, test callback
* All AJAX errors will log to the console
* The onError callback will only be called if defined
2013-06-27 16:03:41 -04:00
Chris Adams
5eccdfee98 Better match project style 2013-06-27 15:58:09 -04:00
Chris Adams
496b7d757b Simplify OpenSeadragon.makeAjaxRequest
* Since async is always true – and browsers are starting to deprecate
  synchronous XHR – we were able to prune considerable amount of code
* Add an error callback to match the existing success callback
2013-06-27 15:58:09 -04:00
iangilman
8fe0ce26b8 Merge pull request #136 from acdha/jshint-cleanup
JSHint tidying
2013-06-26 09:37:08 -07:00
Chris Adams
f2cba16a8b Safe cleanup in makeAjaxRequest error handler
Previously `request.onreadystatechange` was assigned an empty function
on success but null on failures, which breaks in IE (see
http://jsbin.com/ezozax/6/).

This patch simply mimics the success behaviour in the cleanup function

Closes #143
2013-06-25 14:13:45 -04:00
Chris Adams
c2107fcb22 Declare _processDZIError directly on OpenSeadragon 2013-06-21 16:37:31 -04:00
Kevin Ewing
8896c2278d Fixed mistake 2013-06-20 13:31:04 -07: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
adc4147304 Expose semi-private processDZIError for use by DziTileSource
This previously wasn't in scope outside of the main OpenSeadragon
closure. Now it's exposed with an underscore prefix to encourage people
not to think of it as a public interface.
2013-06-20 15:12:54 -04:00
Chris Adams
51bb8ca46e openseadragon.js: fix imageFormatSupported refs 2013-06-20 15:12:54 -04:00
Chris Adams
eafc822aa8 openseadragon.js: remove unused builtin aliases 2013-06-20 15:12:54 -04:00
Chris Adams
8c433ba81c Declare assumed globals 2013-06-20 15:12:54 -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
iangilman
6e9a300d1a Merge pull request #133 from iangilman/raf
Improved requestAnimationFrame polyfill; fixed timer leaks; added tests
2013-06-20 09:52:10 -07:00
Kevin Ewing
0984106983 Added missing semicolon 2013-06-20 09:08:21 -07:00
Kevin Ewing
2f8a26fda0 Responding to feedback
Function now re-assigns itself on the first go round to avoid doing the
check every time it is called
2013-06-19 15:13:56 -07:00
Ian Gilman
e0282a3c86 Stripped whitespace 2013-06-19 13:33:01 -07:00
Kevin Ewing
ebffea5a34 Merge branch 'master' into now 2013-06-19 11:23:42 -07:00
Ian Gilman
8e88f36098 Merge branch 'master' into raf
Fixed Conflicts:
	src/viewer.js
2013-06-19 11:19:54 -07:00
Kevin Ewing
e8408c1313 Moved to better location 2013-06-19 11:16:45 -07:00
Kevin Ewing
6a3b7cfb2f Added OpenSeadragon.now() 2013-06-19 10:57:09 -07: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
Ian Gilman
4022206261 Removed the parens around new Date call, for consistency 2013-06-19 10:03:44 -07:00
Ian Gilman
2e48239056 Addressing code review comments 2013-06-19 09:58:22 -07:00
Ian Gilman
0112f6a4ea Improved requestAnimationFrame polyfill
Processes all outstanding frame requests per frame, rather than one at
a time.
2013-06-17 11:28:42 -07:00
Ventero
0093153e4e Simplify setting element opacity.
This simplifies setElementOpacity by removing support for the
obsolete, IE-only element.filters property. Also removes a variable
that previously leaked into the global scope.
2013-06-13 19:09:47 +02:00
Ian Gilman
300167bcf1 Merge branch 'master' into ratio 2013-06-13 09:41:01 -07:00
houseofyin
3e24be12e0 Merge branch 'master' of github.com:openseadragon/openseadragon into issue37-navigator 2013-06-01 14:12:04 -04:00
Ian Gilman
83060156a6 Merge branch 'master' into ratio 2013-05-31 09:18:25 -07:00
Robert Hickman
699a5dd101 Adding documentation about navPrevNextWrap. 2013-05-30 12:46:54 -06:00
Ian Gilman
b34f460fb0 Reverting minPixelRatio to 0.5 for better quality 2013-05-30 10:07:34 -07:00
Robert Hickman
b5d977d593 Adding an option that allows the previous and next buttons to wrap around past the end or beginning images. 2013-05-29 17:10:45 -06:00
houseofyin
6385b0a296 Merge branch 'master' of github.com:openseadragon/openseadragon into issue37-navigator 2013-05-26 21:17:01 -04:00
houseofyin
f632d98730 Working on follow-up on the initial pull request. Changing the default navigator display property, and starting work on the docs 2013-05-26 21:16:56 -04:00