Merge branch 'master' of github.com:kangax/fabric.js

This commit is contained in:
Andrea Bogazzi 2018-04-28 00:50:18 +02:00
commit b946e8ae6b
3 changed files with 6 additions and 6 deletions

View file

@ -43,7 +43,7 @@
"build": "node build.js modules=ALL requirejs exclude=gestures,accessors",
"build:fast": "node build.js modules=ALL requirejs fast exclude=gestures,accessors",
"build:watch": "onchange 'src/**/**' 'HEADER.js' 'lib/**/**' -- npm run build_export",
"build_with_gestures": "node build.js modules=ALL exclude=json",
"build_with_gestures": "node build.js modules=ALL exclude=accessors",
"build_export": "npm run build:fast && npm run export_dist_to_site",
"test": "node test.js",
"lint": "eslint --config .eslintrc.json src",

View file

@ -1362,7 +1362,7 @@
height: height + 'px',
left: 0,
top: 0,
'touch-action': 'none'
'touch-action': this.allowTouchScrolling ? 'manipulation' : 'none'
});
element.width = width;
element.height = height;

View file

@ -52,7 +52,7 @@
// mouse events
addListener(this.upperCanvasEl, 'mousedown', this._onMouseDown);
addListener(this.upperCanvasEl, 'dblclick', this._onDoubleClick);
addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove, addEventOptions);
addListener(this.upperCanvasEl, 'mouseout', this._onMouseOut);
addListener(this.upperCanvasEl, 'mouseenter', this._onMouseEnter);
addListener(this.upperCanvasEl, 'wheel', this._onMouseWheel);
@ -255,7 +255,7 @@
addListener(fabric.document, 'touchmove', this._onMouseMove, addEventOptions);
removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
removeListener(this.upperCanvasEl, 'touchmove', this._onMouseMove, addEventOptions);
removeListener(this.upperCanvasEl, 'touchmove', this._onMouseMove);
if (e.type === 'touchstart') {
// Unbind mousedown to prevent double triggers from touch devices
@ -278,9 +278,9 @@
removeListener(fabric.document, 'touchend', this._onMouseUp, addEventOptions);
removeListener(fabric.document, 'mousemove', this._onMouseMove);
removeListener(fabric.document, 'touchmove', this._onMouseMove, addEventOptions);
removeListener(fabric.document, 'touchmove', this._onMouseMove);
addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
addListener(this.upperCanvasEl, 'mousemove', this._onMouseMove, addEventOptions);
addListener(this.upperCanvasEl, 'touchmove', this._onMouseMove, addEventOptions);
if (e.type === 'touchend') {