Commit Graph

123 Commits

Author SHA1 Message Date
pnorcrss
bf3dd7c031 fixed _getSafeElemSize() calls 2013-07-31 13:28:38 -05:00
pnorcrss
750eafcd2e added and implemented _getSafeElemSize() 2013-07-31 13:00:16 -05:00
Chris Adams
0ed4703bd3 Viewport messages: add a class to the dialog for easy styling 2013-07-01 18:26:44 -04:00
Chris Adams
1ab6094420 Viewer: make viewport messages private, repeatable
* 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
2013-07-01 13:43:48 -04:00
Chris Adams
b912896158 Viewer.showMessage() hides any previous message 2013-07-01 12:58:22 -04:00
Chris Adams
1f345e4cc5 Viewer: refactor message code into showMessage/hideMessage methods
This avoids the need to deal with classes, and explicitly makes it
reusable for other needs
2013-06-28 15:46:31 -04:00
Chris Adams
7f42dfc032 code style 2013-06-28 15:01:56 -04:00
Chris Adams
7dcf662fdd Viewer: add a basic error message display system
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.
2013-06-28 14:32:57 -04:00
Chris Adams
2bf6b13bfe User-visible warning when tile sources fail to load
This is currently using window.alert in lieu of something more sophisticated but it works for indicating 404s or invalid file
contents
2013-06-28 14:11:20 -04:00
iangilman
8fe0ce26b8 Merge pull request #136 from acdha/jshint-cleanup
JSHint tidying
2013-06-26 09:37:08 -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
9ef6e085c8 viewer.js: update onfullscreenchange handler comment 2013-06-20 15:17:48 -04:00
Chris Adams
de29a34890 viewer.js: remove dead code 2013-06-20 15:12:55 -04:00
Chris Adams
f8c77f65d7 viewer.js: fix typos in variable declarations 2013-06-20 15:12:53 -04:00
Chris Adams
d644acd50b Fix lack of braces on if statements
JavaScript's most popular rack in the grass for maintenance coders…
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
Ian Gilman
8e88f36098 Merge branch 'master' into raf
Fixed Conflicts:
	src/viewer.js
2013-06-19 11:19:54 -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
beadcdcc89 Merge branch 'master' into raf 2013-06-19 10:15:53 -07:00
Ian Gilman
dbc8a59ae8 Cleaned out dead code in scheduleUpdate and updateMulti
… as pointed out by @ventero
2013-06-19 09:58:09 -07:00
Robert Hickman
ade93ffc5e Only disable the previous button if the navPrevNextWrap option is not set. 2013-06-18 15:19:09 -06:00
Ian Gilman
713fad4224 Exposing _updateRequestId as a semi-private member for testing purposes 2013-06-18 11:06:43 -07:00
Ian Gilman
e99c126a85 Navigator now updates properly when reopening a viewer
Before, if you closed a viewer and then opened a new tilesource into
it, the navigator would still have the old tilesource. This patch fixes
that.
2013-06-17 11:51:02 -07:00
Ian Gilman
c6a38dd802 Now closing the navigator when the viewer closes
At the very least this was causing the navigator to continue to request
and process frames even after its viewer had been closed.
2013-06-17 11:31:41 -07:00
Ian Gilman
4224960252 Fixed another potential timer leak when closing a viewer
If the viewer was closed in response to an event raised during the
update function, the timer would have continued running.
2013-06-17 11:30:31 -07:00
houseofyin
3e24be12e0 Merge branch 'master' of github.com:openseadragon/openseadragon into issue37-navigator 2013-06-01 14:12:04 -04:00
houseofyin
e36f7ed414 Trying to remove the selector element 2013-06-01 14:11:56 -04:00
Ian Gilman
9c60b28ec3 Merge branch 'master' of github.com:robhobbes/openseadragon into robhobbes-master
Fixed Conflicts:
	changelog.txt
2013-05-31 09:01:14 -07:00
Ventero
b66dd7bed0 Don't load the tile source again when creating a navigator.
Previously, when showNavigator was set to true when creating the
viewer, the navigator would unnecessarily load and parse the tile
source, even though a fully parsed object already exists.
2013-05-30 02:53:53 +02: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
Ian Gilman
b7eb78a57a Additional doc comments for setControlsEnabled() 2013-05-28 13:54:13 -07:00
David Steinbrunner
7330b4a726 Correction to setControlsEnabled function name in comments 2013-05-28 17:36:09 -03:00
iangilman
da86ca2e38 Merge pull request #46 from houseofyin/issue37-navigator
Issue37 navigator
2013-05-20 09:38:49 -07:00
houseofyin
bb4a8a0b4f Bringing back in sync with the latest baseline 2013-05-17 22:29:08 -04:00
Benjamin Gilbert
fa1a8b2dde Fix Drawer event emission
Drawer tries to emit events on the parent Viewer object but doesn't have
a reference to it.  Add a reference when constructing the Drawer.
2013-05-16 02:49:29 -04:00
Ian Gilman
c78f3ef743 Fixed mislabeled JSDoc comment for OpenSeadragon.Viewer.prototype.open 2013-05-14 10:29:15 -07:00
iangilman
0b366d7b42 Merge pull request #89 from bgilbert/license
Revert to original New BSD license; clean up license declarations
2013-05-14 09:15:00 -07:00
Benjamin Gilbert
fcc119bb84 Add file-specific descriptions to file headers 2013-05-14 00:00:24 -04:00
Benjamin Gilbert
17a6ee15b1 Include 2010 in "OpenSeadragon contributors" copyright dates
This Git repository starts in 2011, but the CodePlex Mercurial repository
has commits from 2010.
2013-05-13 23:32:09 -04:00
Benjamin Gilbert
99d6ff80b6 Add fullpage class to viewer element when in fullpage mode
Closes #61.
2013-05-12 23:02:18 -04:00
Benjamin Gilbert
522bcbf058 Add addClass()/removeClass() utility functions 2013-05-12 22:53:41 -04:00
Benjamin Gilbert
2f2eba8df2 Add "OpenSeadragon contributors" copyright statement
The license text will be provided on the website, etc., and it seems
strange to list no copyright date newer than the original CodePlex
copyright from the AJAX Control Toolkit.  Add a blanket copyright
statement for contributions to the OpenSeadragon project, stating that
copyright is held by the authors of each contribution.  This blanket
statement is not intended to preclude individual contributors from
attaching their own copyright statements to their modifications.
2013-05-12 17:12:26 -04:00
Benjamin Gilbert
be20645876 Add BSD license block and CodePlex copyright to each source file
See discussion in #10.
2013-05-10 00:16:55 -04:00
Ian Gilman
bd0b0972b3 Fixed bad class names in docs 2013-05-02 09:57:23 -07:00
Ian Gilman
1c6deafe8b Added viewport property to Viewer documentation 2013-05-02 09:57:03 -07:00
Benjamin Gilbert
3652c7066c Re-add viewer.source check in updateMulti()
It should be redundant in normal operation, but may prevent a timer leak
in case of a bug in the open/close path.
2013-04-29 13:17:37 -04:00
Benjamin Gilbert
8cb2714dae Fix timer leak after multiple Viewer.open() calls, take 2
Track the request ID of the outstanding animation frame and cancel it
on Viewer.close().

Fixes #76.
2013-04-26 22:32:51 -04:00
Benjamin Gilbert
23c20e3d5a Revert "Fix timer leak after multiple Viewer.open() calls"
This should be done with cancelAnimationFrame() instead.

This reverts commit 47aba60940.
2013-04-26 21:48:48 -04:00
Benjamin Gilbert
47aba60940 Fix timer leak after multiple Viewer.open() calls
Keep a counter of Viewer.close() calls in private state and a copy in
the timer's closure, and stop the timer when they no longer match.

Fixes #76.
2013-04-25 00:37:36 -04:00
Benjamin Gilbert
b315b148c2 Drop remains of code to show "Loading..." message
It calls a method that no longer exists, but only when an impossible
condition is true.
2013-04-24 23:57:35 -04:00