fix for the chrome 50 changes where they removed the SVGElement.offset* attributes.
This commit is contained in:
parent
e54364a45c
commit
dc23dac20c
1 changed files with 10 additions and 10 deletions
|
|
@ -102,11 +102,11 @@ $(function(){
|
|||
self.availableWidth($('#workingarea div.span8').innerWidth());
|
||||
};
|
||||
|
||||
self.move_laser = function(el){
|
||||
self.move_laser = function(data, evt){
|
||||
self.abortFreeTransforms();
|
||||
if(self.state.isOperational() && !self.state.isPrinting()){
|
||||
var x = self.px2mm(event.offsetX);
|
||||
var y = self.px2mm(event.toElement.ownerSVGElement.offsetHeight - event.offsetY); // hopefully this works across browsers
|
||||
var x = self.px2mm(evt.offsetX);
|
||||
var y = self.px2mm(evt.toElement.ownerSVGElement.getBoundingClientRect().height - evt.offsetY); // hopefully this works across browsers
|
||||
x = Math.min(x, self.workingAreaWidthMM());
|
||||
y = Math.min(y, self.workingAreaHeightMM());
|
||||
$.ajax({
|
||||
|
|
|
|||
Loading…
Reference in a new issue