Skip to content

Instantly share code, notes, and snippets.

@sickrandir
Last active October 11, 2016 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sickrandir/51f0eb458b12a2245c5995c16eda56a1 to your computer and use it in GitHub Desktop.
Save sickrandir/51f0eb458b12a2245c5995c16eda56a1 to your computer and use it in GitHub Desktop.
if (useSketch) {
var offsetForRotation = tiledImage.viewport.degrees !== 0 && sketchScale;
if (tiledImage.source.tilesUrl == "https://differenthood.duckdns.org:3000/system/label_item_images/dzi_files/handle3_grey_files/") {
console.log(tiledImage);
console.log(bounds);
console.log(sketchScale);
console.log(sketchTranslate);
}
if (offsetForRotation) {
tiledImage._drawer._offsetForRotation(tiledImage.viewport.degrees, false);
}
tiledImage._drawer.blendSketch({
opacity: tiledImage.opacity,
scale: sketchScale,
translate: sketchTranslate,
compositeOperation: tiledImage.compositeOperation,
bounds: bounds
});
if (offsetForRotation) {
tiledImage._drawer._restoreRotationChanges(false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment