openseadragon 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/openseadragon/engine.rb +3 -0
- data/lib/openseadragon/version.rb +1 -1
- data/vendor/assets/javascripts/openseadragon.js +25 -25
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c6beccf0ba60800453f1adeffb12691dd04931c
|
4
|
+
data.tar.gz: 33f09a888a395d8021458abe3f027a5dbb936cdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c90144b5c35eb5614fff3357f58ec12a1f4f84a47e291d43cfb4aaf77bebfe3a9cd48c9bee1385d5b5df171ece06c105e2761ae0881d7bb315e88036d80b4a6c
|
7
|
+
data.tar.gz: 069491f668e81f98c072f561aea039a7f71ab2c76431f499ae44df0f4ed30889880f6eb65235fae68bceede25d2d12442b28cdb6444523cf01506389f226973b
|
data/README.md
CHANGED
@@ -8,6 +8,11 @@ http://openseadragon.github.io/
|
|
8
8
|
|
9
9
|
This gem provides two helpers, `#picture_tag` and `#openseadragon_picture_tag`.
|
10
10
|
|
11
|
+
In your controller add this line:
|
12
|
+
```ruby
|
13
|
+
helper Openseadragon::OpenseadragonHelper
|
14
|
+
```
|
15
|
+
|
11
16
|
## picture_tag
|
12
17
|
|
13
18
|
The `#picture_tag` helper creates [HTML5 <picture> tags](http://www.w3.org/TR/html-picture-element/).
|
data/lib/openseadragon/engine.rb
CHANGED
@@ -728,7 +728,7 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
|
|
728
728
|
tileHost: null,
|
729
729
|
initialPage: 0,
|
730
730
|
crossOriginPolicy: 'Anonymous',
|
731
|
-
|
731
|
+
|
732
732
|
//PAN AND ZOOM SETTINGS AND CONSTRAINTS
|
733
733
|
panHorizontal: true,
|
734
734
|
panVertical: true,
|
@@ -3527,7 +3527,7 @@ $.EventSource.prototype = /** @lends OpenSeadragon.EventSource.prototype */{
|
|
3527
3527
|
|
3528
3528
|
THIS[ tracker.hash ].lastTouch = event.touches[ 0 ];
|
3529
3529
|
onMouseOver( tracker, event, true );
|
3530
|
-
// call with no capture as the onMouseMoveCaptured will
|
3530
|
+
// call with no capture as the onMouseMoveCaptured will
|
3531
3531
|
// be triggered by onTouchMove
|
3532
3532
|
onMouseDown( tracker, event, true, true );
|
3533
3533
|
}
|
@@ -3608,7 +3608,7 @@ $.EventSource.prototype = /** @lends OpenSeadragon.EventSource.prototype */{
|
|
3608
3608
|
|
3609
3609
|
THIS[ tracker.hash ].lastTouch = null;
|
3610
3610
|
|
3611
|
-
// call with no release, as the mouse events are
|
3611
|
+
// call with no release, as the mouse events are
|
3612
3612
|
// not registered in onTouchStart
|
3613
3613
|
onMouseUpCaptured( tracker, event, true, true );
|
3614
3614
|
onMouseOut( tracker, event, true );
|
@@ -3713,7 +3713,7 @@ $.EventSource.prototype = /** @lends OpenSeadragon.EventSource.prototype */{
|
|
3713
3713
|
}, tracker.stopDelay );
|
3714
3714
|
}
|
3715
3715
|
}
|
3716
|
-
|
3716
|
+
|
3717
3717
|
/**
|
3718
3718
|
* @private
|
3719
3719
|
* @inner
|
@@ -3789,7 +3789,7 @@ $.EventSource.prototype = /** @lends OpenSeadragon.EventSource.prototype */{
|
|
3789
3789
|
|
3790
3790
|
|
3791
3791
|
/**
|
3792
|
-
* Handles 'wheel' events.
|
3792
|
+
* Handles 'wheel' events.
|
3793
3793
|
* The event may be simulated by the legacy mouse wheel event handler (onMouseWheel()) or onTouchMove().
|
3794
3794
|
*
|
3795
3795
|
* @private
|
@@ -4592,7 +4592,7 @@ $.Viewer = function( options ) {
|
|
4592
4592
|
/**
|
4593
4593
|
* A <textarea> element, the element where keyboard events are handled.<br><br>
|
4594
4594
|
* Child element of {@link OpenSeadragon.Viewer#container},
|
4595
|
-
* positioned below {@link OpenSeadragon.Viewer#canvas}.
|
4595
|
+
* positioned below {@link OpenSeadragon.Viewer#canvas}.
|
4596
4596
|
* @member {Element} keyboardCommandArea
|
4597
4597
|
* @memberof OpenSeadragon.Viewer#
|
4598
4598
|
*/
|
@@ -4601,7 +4601,7 @@ $.Viewer = function( options ) {
|
|
4601
4601
|
* A <div> element, the element where user-input events are handled for panning and zooming.<br><br>
|
4602
4602
|
* Child element of {@link OpenSeadragon.Viewer#container},
|
4603
4603
|
* positioned on top of {@link OpenSeadragon.Viewer#keyboardCommandArea}.<br><br>
|
4604
|
-
* The parent of {@link OpenSeadragon.Drawer#canvas} instances.
|
4604
|
+
* The parent of {@link OpenSeadragon.Drawer#canvas} instances.
|
4605
4605
|
* @member {Element} canvas
|
4606
4606
|
* @memberof OpenSeadragon.Viewer#
|
4607
4607
|
*/
|
@@ -4723,14 +4723,14 @@ $.Viewer = function( options ) {
|
|
4723
4723
|
if( this.tileSources.length > 1 ){
|
4724
4724
|
THIS[ this.hash ].sequenced = true;
|
4725
4725
|
}
|
4726
|
-
|
4726
|
+
|
4727
4727
|
//Keeps the initial page within bounds
|
4728
4728
|
if ( this.initialPage > this.tileSources.length - 1 ){
|
4729
4729
|
this.initialPage = this.tileSources.length - 1;
|
4730
4730
|
}
|
4731
|
-
|
4731
|
+
|
4732
4732
|
initialTileSource = this.tileSources[ this.initialPage ];
|
4733
|
-
|
4733
|
+
|
4734
4734
|
//Update the sequence (aka currrent page) property
|
4735
4735
|
THIS[ this.hash ].sequence = this.initialPage;
|
4736
4736
|
} else {
|
@@ -5769,7 +5769,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|
5769
5769
|
}
|
5770
5770
|
return this;
|
5771
5771
|
},
|
5772
|
-
|
5772
|
+
|
5773
5773
|
/**
|
5774
5774
|
* Gets the active page of a sequence
|
5775
5775
|
* @function
|
@@ -6008,7 +6008,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|
6008
6008
|
}
|
6009
6009
|
}
|
6010
6010
|
},
|
6011
|
-
|
6011
|
+
|
6012
6012
|
/**
|
6013
6013
|
* Display a message in the viewport
|
6014
6014
|
* @function OpenSeadragon.Viewer.prototype._showMessage
|
@@ -7005,7 +7005,7 @@ $.Navigator = function( options ){
|
|
7005
7005
|
options.controlOptions.width = options.width;
|
7006
7006
|
}
|
7007
7007
|
}
|
7008
|
-
|
7008
|
+
|
7009
7009
|
} else {
|
7010
7010
|
this.element = document.getElementById( options.id );
|
7011
7011
|
options.controlOptions = {
|
@@ -7135,7 +7135,7 @@ $.Navigator = function( options ){
|
|
7135
7135
|
$.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /** @lends OpenSeadragon.Navigator.prototype */{
|
7136
7136
|
|
7137
7137
|
/**
|
7138
|
-
* Used to notify the navigator when its size has changed.
|
7138
|
+
* Used to notify the navigator when its size has changed.
|
7139
7139
|
* Especially useful when {@link OpenSeadragon.Options}.navigatorAutoResize is set to false and the navigator is resizable.
|
7140
7140
|
* @function
|
7141
7141
|
*/
|
@@ -7792,7 +7792,7 @@ $.TileSource = function( width, height, tileSize, tileOverlap, minLevel, maxLeve
|
|
7792
7792
|
* @memberof OpenSeadragon.TileSource#
|
7793
7793
|
*/
|
7794
7794
|
/**
|
7795
|
-
*
|
7795
|
+
*
|
7796
7796
|
* @member {Boolean} ready
|
7797
7797
|
* @memberof OpenSeadragon.TileSource#
|
7798
7798
|
*/
|
@@ -8966,7 +8966,7 @@ $.IIIF1_1TileSource = function( options ){
|
|
8966
8966
|
// If we're smaller than 256, just use the short side.
|
8967
8967
|
options.tileSize = shortDim;
|
8968
8968
|
}
|
8969
|
-
this.tile_width = options.tileSize; // So that 'full' gets used for
|
8969
|
+
this.tile_width = options.tileSize; // So that 'full' gets used for
|
8970
8970
|
this.tile_height = options.tileSize; // the region below
|
8971
8971
|
}
|
8972
8972
|
|
@@ -10382,7 +10382,7 @@ $.ButtonGroup = function( options ) {
|
|
10382
10382
|
*/
|
10383
10383
|
this.element = options.element || $.makeNeutralElement( "fieldgroup" );
|
10384
10384
|
|
10385
|
-
// TODO What if there IS an options.group specified?
|
10385
|
+
// TODO What if there IS an options.group specified?
|
10386
10386
|
if( !options.group ){
|
10387
10387
|
this.label = $.makeNeutralElement( "label" );
|
10388
10388
|
//TODO: support labels for ButtonGroups
|
@@ -11174,7 +11174,7 @@ function loadPanels( strip, viewerSize, scroll ) {
|
|
11174
11174
|
*/
|
11175
11175
|
function onStripEnter( event ) {
|
11176
11176
|
var element = event.eventSource.element;
|
11177
|
-
|
11177
|
+
|
11178
11178
|
//$.setElementOpacity(element, 0.8);
|
11179
11179
|
|
11180
11180
|
//element.style.border = '1px solid #555';
|
@@ -11202,7 +11202,7 @@ function onStripEnter( event ) {
|
|
11202
11202
|
*/
|
11203
11203
|
function onStripExit( event ) {
|
11204
11204
|
var element = event.eventSource.element;
|
11205
|
-
|
11205
|
+
|
11206
11206
|
if ( 'horizontal' == this.scroll ) {
|
11207
11207
|
|
11208
11208
|
//element.style.paddingTop = "10px";
|
@@ -11940,7 +11940,7 @@ $.Tile.prototype = /** @lends OpenSeadragon.Tile.prototype */{
|
|
11940
11940
|
placement: placement
|
11941
11941
|
};
|
11942
11942
|
}
|
11943
|
-
|
11943
|
+
|
11944
11944
|
this.element = options.element;
|
11945
11945
|
this.scales = options.location instanceof $.Rect;
|
11946
11946
|
this.bounds = new $.Rect(
|
@@ -12192,7 +12192,7 @@ var DEVICE_SCREEN = $.getWindowSize(),
|
|
12192
12192
|
|
12193
12193
|
/**
|
12194
12194
|
* @class Drawer
|
12195
|
-
* @classdesc Handles rendering of tiles for an {@link OpenSeadragon.Viewer}.
|
12195
|
+
* @classdesc Handles rendering of tiles for an {@link OpenSeadragon.Viewer}.
|
12196
12196
|
* A new instance is created for each TileSource opened (see {@link OpenSeadragon.Viewer#drawer}).
|
12197
12197
|
*
|
12198
12198
|
* @memberof OpenSeadragon
|
@@ -14038,7 +14038,7 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
|
|
14038
14038
|
}
|
14039
14039
|
this.degrees = degrees;
|
14040
14040
|
this.viewer.drawer.update();
|
14041
|
-
|
14041
|
+
|
14042
14042
|
return this;
|
14043
14043
|
},
|
14044
14044
|
|
@@ -14376,7 +14376,7 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
|
|
14376
14376
|
return viewerCoordinates.plus(
|
14377
14377
|
OpenSeadragon.getElementPosition( this.viewer.element ));
|
14378
14378
|
},
|
14379
|
-
|
14379
|
+
|
14380
14380
|
/**
|
14381
14381
|
* Convert a viewport zoom to an image zoom.
|
14382
14382
|
* Image zoom: ratio of the original image size to displayed image size.
|
@@ -14394,7 +14394,7 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
|
|
14394
14394
|
var viewportToImageZoomRatio = containerWidth / imageWidth;
|
14395
14395
|
return viewportZoom * viewportToImageZoomRatio;
|
14396
14396
|
},
|
14397
|
-
|
14397
|
+
|
14398
14398
|
/**
|
14399
14399
|
* Convert an image zoom to a viewport zoom.
|
14400
14400
|
* Image zoom: ratio of the original image size to displayed image size.
|
@@ -14414,4 +14414,4 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
|
|
14414
14414
|
}
|
14415
14415
|
};
|
14416
14416
|
|
14417
|
-
}( OpenSeadragon ));
|
14417
|
+
}( OpenSeadragon ));
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openseadragon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-05-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|