The TileSource error handling path used to raise non-obvious
"Unspecified error" exceptions on IE < 10 when configured with a URL
from a different origin (hostname or port) because the handler included
``xhr.status`` in the error message, triggering a security exception.
Now the second exception is caught and the log message will use the
original exception message instead to make the root cause more obvious.
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.
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.
canvas pans when tap on touch screen
reason:
onTouchStart calls onMouseDown which registers 'mousemove' event handler.
when I tap on touch screen, even though browser did not dispatch 'touchmove' event, it dispatched 'mousemove' event.
therefore, the 'mousemove' handler pans canvas.
fix:
stop onTouchStart handler registering 'mousemove' handler as onMouseMove will be properly triggered by onTouchMove
(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
* Marked _showMessage/_hideMessage as private
* Fix DOM manipulation bug: call standard removeNode() method rather
than proprietary WebKit .remove()
* Change messageDiv to be the outer wrapper to simplify removing the
entire message container
* 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
This might be something we want to make configurable for users who want
to completely control how errors are displayed.
This also adds the first use of OpenSeadragon.makeCenteredNode currently
so we might want to clean up that code as well.
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.
* 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
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
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
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.
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.