mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
transition call back is called using the nodes context. This means that you can access the node with the this keyword
This commit is contained in:
@@ -2,7 +2,12 @@
|
||||
// calculate pixel ratio
|
||||
var canvas = document.createElement('canvas'),
|
||||
context = canvas.getContext('2d'),
|
||||
devicePixelRatio = window.devicePixelRatio || 1, backingStoreRatio = context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio || context.backingStorePixelRatio || 1,
|
||||
devicePixelRatio = window.devicePixelRatio || 1,
|
||||
backingStoreRatio = context.webkitBackingStorePixelRatio
|
||||
|| context.mozBackingStorePixelRatio
|
||||
|| context.msBackingStorePixelRatio
|
||||
|| context.oBackingStorePixelRatio
|
||||
|| context.backingStorePixelRatio || 1,
|
||||
_pixelRatio = devicePixelRatio / backingStoreRatio;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user