- Fix: Map extension click events to "mousedown" so they can be received
on touch devices (since `touch.js` changes `touchstart` to
`mousedown`) (@ClemArt); closes #168
- Fix: Ensure extension `mouseup` events run on "zoom" and "select"
modes (@iuyiuy); closes #159
This commit is contained in:
12
dist/index-es.js
vendored
12
dist/index-es.js
vendored
@@ -16059,7 +16059,7 @@ function SvgCanvas(container, config) {
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
break;
|
||||
|
||||
case 'zoom':
|
||||
if (rubberBox != null) {
|
||||
@@ -16074,7 +16074,7 @@ function SvgCanvas(container, config) {
|
||||
height: Math.abs(realY - rStartY),
|
||||
factor: factor
|
||||
});
|
||||
return;
|
||||
break;
|
||||
|
||||
case 'fhpath':
|
||||
// Check that the path contains at least 2 points; a degenerate one-point path
|
||||
@@ -31090,6 +31090,12 @@ editor.init = function () {
|
||||
// Add given events to button
|
||||
$$b.each(btn.events, function (name, func) {
|
||||
if (name === 'click' && btn.type === 'mode') {
|
||||
// `touch.js` changes `touchstart` to `mousedown`,
|
||||
// so we must map extension click events as well
|
||||
if (isTouch() && name === 'click') {
|
||||
name = 'mousedown';
|
||||
}
|
||||
|
||||
if (btn.includeWith) {
|
||||
button.bind(name, func);
|
||||
} else {
|
||||
@@ -33470,6 +33476,8 @@ editor.init = function () {
|
||||
|
||||
|
||||
if (opts.evt) {
|
||||
// `touch.js` changes `touchstart` to `mousedown`,
|
||||
// so we must map tool button click events as well
|
||||
if (isTouch() && opts.evt === 'click') {
|
||||
opts.evt = 'mousedown';
|
||||
}
|
||||
|
||||
2
dist/index-es.min.js
vendored
2
dist/index-es.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index-es.min.js.map
vendored
2
dist/index-es.min.js.map
vendored
File diff suppressed because one or more lines are too long
12
dist/index-umd.js
vendored
12
dist/index-umd.js
vendored
@@ -16065,7 +16065,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
break;
|
||||
|
||||
case 'zoom':
|
||||
if (rubberBox != null) {
|
||||
@@ -16080,7 +16080,7 @@
|
||||
height: Math.abs(realY - rStartY),
|
||||
factor: factor
|
||||
});
|
||||
return;
|
||||
break;
|
||||
|
||||
case 'fhpath':
|
||||
// Check that the path contains at least 2 points; a degenerate one-point path
|
||||
@@ -31096,6 +31096,12 @@
|
||||
// Add given events to button
|
||||
$$b.each(btn.events, function (name, func) {
|
||||
if (name === 'click' && btn.type === 'mode') {
|
||||
// `touch.js` changes `touchstart` to `mousedown`,
|
||||
// so we must map extension click events as well
|
||||
if (isTouch() && name === 'click') {
|
||||
name = 'mousedown';
|
||||
}
|
||||
|
||||
if (btn.includeWith) {
|
||||
button.bind(name, func);
|
||||
} else {
|
||||
@@ -33476,6 +33482,8 @@
|
||||
|
||||
|
||||
if (opts.evt) {
|
||||
// `touch.js` changes `touchstart` to `mousedown`,
|
||||
// so we must map tool button click events as well
|
||||
if (isTouch() && opts.evt === 'click') {
|
||||
opts.evt = 'mousedown';
|
||||
}
|
||||
|
||||
2
dist/index-umd.min.js
vendored
2
dist/index-umd.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index-umd.min.js.map
vendored
2
dist/index-umd.min.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user