|
|
@ -231,7 +231,7 @@ class View { |
|
|
|
// but at least then we'll have the target transition
|
|
|
|
this.body.view.scale = this.targetScale; |
|
|
|
var viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.canvas.frame.canvas.clientWidth, y: 0.5 * this.canvas.frame.canvas.clientHeight}); |
|
|
|
console.log('viewCenter', viewCenter,this.body.view.translation, options.position) |
|
|
|
|
|
|
|
var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node
|
|
|
|
x: viewCenter.x - options.position.x, |
|
|
|
y: viewCenter.y - options.position.y |
|
|
|