mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Merge branch 'master' of github.com:openseadragon/openseadragon
This commit is contained in:
commit
08f299e9bf
9
.vscode/settings.json
vendored
9
.vscode/settings.json
vendored
@ -1,8 +1,5 @@
|
||||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
// Controls the font size.
|
||||
"editor.fontSize": 14,
|
||||
|
||||
// The number of spaces a tab is equal to.
|
||||
"editor.tabSize": 4,
|
||||
|
||||
@ -15,12 +12,6 @@
|
||||
// Columns at which to show vertical rulers
|
||||
"editor.rulers": [80],
|
||||
|
||||
// Controls after how many characters the editor will wrap to the next line. Setting this to 0 turns on viewport width wrapping
|
||||
"editor.wrappingColumn": 0,
|
||||
|
||||
// Controls the indentation of wrapped lines. Can be one of 'none', 'same' or 'indent'.
|
||||
"editor.wrappingIndent": "none",
|
||||
|
||||
// The default character set encoding to use when reading and writing files.
|
||||
"files.encoding": "utf8",
|
||||
|
||||
|
@ -123,10 +123,11 @@ module.exports = function(grunt) {
|
||||
join_vars: false
|
||||
},
|
||||
sourceMap: true,
|
||||
sourceMapName: 'build/openseadragon/openseadragon.min.js.map'
|
||||
sourceMapName: 'build/openseadragon/openseadragon.min.js.map',
|
||||
sourceMapIn: 'build/openseadragon/openseadragon.js.map'
|
||||
},
|
||||
openseadragon: {
|
||||
src: sources,
|
||||
src: distribution,
|
||||
dest: minified
|
||||
}
|
||||
},
|
||||
|
@ -18,10 +18,10 @@
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-contrib-clean": "^0.7.0",
|
||||
"grunt-contrib-compress": "^0.13.0",
|
||||
"grunt-contrib-concat": "^0.5.1",
|
||||
"grunt-contrib-concat": "^1.0.1",
|
||||
"grunt-contrib-connect": "^0.11.2",
|
||||
"grunt-contrib-jshint": "^0.11.0",
|
||||
"grunt-contrib-uglify": "^0.11.0",
|
||||
"grunt-contrib-uglify": "^2.0.0",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-git-describe": "^2.3.2",
|
||||
"grunt-qunit-istanbul": "^0.6.0",
|
||||
|
@ -328,7 +328,11 @@ $.Drawer.prototype = {
|
||||
// the viewport get rotated later on, we will need to resize it.
|
||||
if (this.viewport.getRotation() === 0) {
|
||||
var self = this;
|
||||
this.viewer.addOnceHandler('rotate', function resizeSketchCanvas() {
|
||||
this.viewer.addHandler('rotate', function resizeSketchCanvas() {
|
||||
if (self.viewport.getRotation() === 0) {
|
||||
return;
|
||||
}
|
||||
self.viewer.removeHandler('rotate', resizeSketchCanvas);
|
||||
var sketchCanvasSize = self._calculateSketchCanvasSize();
|
||||
self.sketchCanvas.width = sketchCanvasSize.x;
|
||||
self.sketchCanvas.height = sketchCanvasSize.y;
|
||||
@ -422,8 +426,8 @@ $.Drawer.prototype = {
|
||||
this.context.globalCompositeOperation = compositeOperation;
|
||||
}
|
||||
if (bounds) {
|
||||
// Internet Explorer and Microsoft Edge throw IndexSizeError
|
||||
// when you call context.drawImage with negative x or y
|
||||
// Internet Explorer and Microsoft Edge throw IndexSizeError
|
||||
// when you call context.drawImage with negative x or y
|
||||
// or width or height greater than the canvas width or height respectively
|
||||
if (bounds.x < 0) {
|
||||
bounds.width += bounds.x;
|
||||
@ -439,7 +443,7 @@ $.Drawer.prototype = {
|
||||
if (bounds.height > this.canvas.height) {
|
||||
bounds.height = this.canvas.height;
|
||||
}
|
||||
|
||||
|
||||
this.context.drawImage(
|
||||
this.sketchCanvas,
|
||||
bounds.x,
|
||||
|
@ -41,6 +41,7 @@
|
||||
* compatibility.
|
||||
* @member OverlayPlacement
|
||||
* @memberof OpenSeadragon
|
||||
* @see OpenSeadragon.Placement
|
||||
* @static
|
||||
* @readonly
|
||||
* @type {Object}
|
||||
@ -400,7 +401,7 @@
|
||||
* @param {OpenSeadragon.Point|OpenSeadragon.Rect|Object} location
|
||||
* If an object is specified, the options are the same than the constructor
|
||||
* except for the element which can not be changed.
|
||||
* @param {OpenSeadragon.Placement} position
|
||||
* @param {OpenSeadragon.Placement} placement
|
||||
*/
|
||||
update: function(location, placement) {
|
||||
var options = $.isPlainObject(location) ? location : {
|
||||
|
@ -1702,8 +1702,11 @@ function drawTiles( tiledImage, lastDrawn ) {
|
||||
var zoom = tiledImage.viewport.getZoom(true);
|
||||
var imageZoom = tiledImage.viewportToImageZoom(zoom);
|
||||
// TODO: support tile edge smoothing with tiled image rotation.
|
||||
if (imageZoom > tiledImage.smoothTileEdgesMinZoom && !tiledImage.iOSDevice &&
|
||||
tiledImage.getRotation() === 0 && $.supportsCanvas) {
|
||||
if (lastDrawn.length > 1 &&
|
||||
imageZoom > tiledImage.smoothTileEdgesMinZoom &&
|
||||
!tiledImage.iOSDevice &&
|
||||
tiledImage.getRotation() === 0 &&
|
||||
$.supportsCanvas) {
|
||||
// When zoomed in a lot (>100%) the tile edges are visible.
|
||||
// So we have to composite them at ~100% and scale them up together.
|
||||
// Note: Disabled on iOS devices per default as it causes a native crash
|
||||
|
@ -423,4 +423,12 @@
|
||||
});
|
||||
|
||||
} );
|
||||
|
||||
test('version object', function() {
|
||||
equal(typeof OpenSeadragon.version.versionStr, "string", "versionStr should be a string");
|
||||
ok(OpenSeadragon.version.major >= 0, "major should be a positive number");
|
||||
ok(OpenSeadragon.version.minor >= 0, "minor should be a positive number");
|
||||
ok(OpenSeadragon.version.revision >= 0, "revision should be a positive number");
|
||||
});
|
||||
|
||||
})();
|
||||
|
@ -14,7 +14,7 @@
|
||||
<script src="/test/lib/jquery-1.9.1.min.js"></script>
|
||||
<script src="/test/lib/jquery-ui-1.10.2/js/jquery-ui-1.10.2.min.js"></script>
|
||||
<script src="/test/lib/jquery.simulate.js"></script>
|
||||
<script src="/build/openseadragon/openseadragon.js"></script>
|
||||
<script src="/build/openseadragon/openseadragon.min.js"></script>
|
||||
<script src="/test/helpers/legacy.mouse.shim.js"></script>
|
||||
<script src="/test/helpers/test.js"></script>
|
||||
<script src="/test/helpers/touch.js"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user