mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 22:26:10 +03:00
remove forced transparency from images in drawercomparison demo. change from context2d naming to canvas.
This commit is contained in:
parent
cc412f0a20
commit
048b43e196
@ -59,7 +59,7 @@ module.exports = function(grunt) {
|
||||
"src/overlay.js",
|
||||
"src/drawerbase.js",
|
||||
"src/htmldrawer.js",
|
||||
"src/context2ddrawer.js",
|
||||
"src/canvasdrawer.js",
|
||||
"src/webgldrawer.js",
|
||||
"src/viewport.js",
|
||||
"src/tiledimage.js",
|
||||
|
@ -35,9 +35,9 @@
|
||||
(function( $ ){
|
||||
|
||||
/**
|
||||
* @class Context2dDrawer
|
||||
* @class CanvasDrawer
|
||||
* @memberof OpenSeadragon
|
||||
* @classdesc Default implementation of Context2dDrawer for an {@link OpenSeadragon.Viewer}.
|
||||
* @classdesc Default implementation of CanvasDrawer for an {@link OpenSeadragon.Viewer}.
|
||||
* @param {Object} options - Options for this Drawer.
|
||||
* @param {OpenSeadragon.Viewer} options.viewer - The Viewer that owns this Drawer.
|
||||
* @param {OpenSeadragon.Viewport} options.viewport - Reference to Viewer viewport.
|
||||
@ -45,7 +45,7 @@
|
||||
* @param {Number} [options.debugGridColor] - See debugGridColor in {@link OpenSeadragon.Options} for details.
|
||||
*/
|
||||
|
||||
class Context2dDrawer extends $.DrawerBase{
|
||||
class CanvasDrawer extends $.DrawerBase{
|
||||
constructor(){
|
||||
super(...arguments);
|
||||
|
||||
@ -1014,7 +1014,7 @@ class Context2dDrawer extends $.DrawerBase{
|
||||
};
|
||||
}
|
||||
}
|
||||
$.Context2dDrawer = Context2dDrawer;
|
||||
$.CanvasDrawer = CanvasDrawer;
|
||||
|
||||
|
||||
/**
|
@ -1353,7 +1353,7 @@ function OpenSeadragon( options ){
|
||||
* @property {Object} webgl - options if the WebGLDrawer is used.
|
||||
* Set 'continuousTileFresh: true' if tile data is modified programmatically
|
||||
* by filtering plugins or similar.
|
||||
* @property {Object} context2d - options if the Context2dDrawer is used
|
||||
* @property {Object} context2d - options if the CanvasDrawer is used
|
||||
* @property {Object} html - options if the HTMLDrawer is used
|
||||
* @property {Object} custom - options if a custom drawer is used
|
||||
*/
|
||||
|
@ -461,7 +461,7 @@ $.Viewer = function( options ) {
|
||||
let optsKey = null;
|
||||
// replace text-based option with appropriate constructor
|
||||
if (Drawer === 'canvas'){
|
||||
Drawer = $.Context2dDrawer;
|
||||
Drawer = $.CanvasDrawer;
|
||||
optsKey = 'canvas';
|
||||
} else if (Drawer === 'html'){
|
||||
Drawer = $.HTMLDrawer;
|
||||
|
@ -14,7 +14,7 @@ const labels = {
|
||||
duomo: 'Duomo',
|
||||
}
|
||||
|
||||
//Double viewer setup for comparison - Context2dDrawer and WebGLDrawer
|
||||
//Double viewer setup for comparison - CanvasDrawer and WebGLDrawer
|
||||
// viewer1: canvas drawer
|
||||
let viewer1 = window.viewer1 = OpenSeadragon({
|
||||
id: "canvasdrawer",
|
||||
@ -281,7 +281,7 @@ function addTileSource(viewer, image, checkbox){
|
||||
let item = ev.item;
|
||||
let field = viewer === viewer1 ? 'item1' : 'item2';
|
||||
$(checkbox).data(field,item);
|
||||
item.source.hasTransparency = ()=>true; //simulate image with transparency, to show seams in default renderer
|
||||
// item.source.hasTransparency = ()=>true; //simulate image with transparency, to show seams in default renderer
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user