| | |
| | | deltaY = this.workSpace.height - eleHeight |
| | | if (oldX + this.eleWidth >= info.x * zoom && info.x * zoom >= oldX) { |
| | | deltaX = -oldX |
| | | //console.log("move_canvas X", oldX) |
| | | //console.log("move_pt_center X", oldX) |
| | | } |
| | | if (oldY + eleHeight >= info.y * zoom && info.y * zoom >= oldY) { |
| | | // console.log("move_canvas Y", oldY) |
| | | // console.log("move_pt_center Y", oldY) |
| | | deltaY = -oldY |
| | | } |
| | | this.canvas.absolutePan(new fabric.Point(deltaX, deltaY));*/ |
| | |
| | | } else if (item.method == "update_current_teaching") { |
| | | const info = item.param || [] |
| | | await _this.updateCurrentTeaching(info) |
| | | } else if (item.method == "move_canvas") { |
| | | } else if (item.method == "move_pt_center") { |
| | | const info2 = item.param || {} |
| | | |
| | | const pt = { |
| | |
| | | if (type == "string") { |
| | | let tip = ex |
| | | console.log(ex) |
| | | plus.nativeUI.alert(tip, undefined, "错误"); |
| | | plus.nativeUI.alert(tip, undefined, this.translate('error')); |
| | | return |
| | | } |
| | | let exStr = JSON.stringify(ex) |
| | |
| | | |
| | | let tip = typeof ex.msg == "string" ? ex.msg : exStr |
| | | console.log(tip) |
| | | plus.nativeUI.alert(tip, undefined, "错误"); |
| | | plus.nativeUI.alert(tip, undefined, this.translate('error')); |
| | | }, |
| | | showToast(ex) { |
| | | const type = typeof ex |