abcjs 6.1.4 → 6.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28060,7 +28060,7 @@ function getCoord(ev) {
28060
28060
  var yOffset = 0; // when renderer.options.responsive === 'resize' the click coords are in relation to the HTML
28061
28061
  // element, we need to convert to the SVG viewBox coords
28062
28062
 
28063
- if (svg.viewBox.baseVal) {
28063
+ if (svg && svg.viewBox && svg.viewBox.baseVal) {
28064
28064
  // Firefox passes null to this when no viewBox is given
28065
28065
  // Chrome makes these values null when no viewBox is given.
28066
28066
  if (svg.viewBox.baseVal.width !== 0) scaleX = svg.viewBox.baseVal.width / svg.clientWidth;
@@ -28235,8 +28235,10 @@ function getTarget(target) {
28235
28235
  var found = target.getAttribute("selectable");
28236
28236
 
28237
28237
  while (!found) {
28238
- target = target.parentElement;
28239
- if (target.tagName === "svg") found = true;else found = target.getAttribute("selectable");
28238
+ if (!target.parentElement) found = true;else {
28239
+ target = target.parentElement;
28240
+ if (target.tagName === "svg") found = true;else found = target.getAttribute("selectable");
28241
+ }
28240
28242
  }
28241
28243
 
28242
28244
  return target;
@@ -28334,7 +28336,7 @@ function mouseUp(ev) {
28334
28336
 
28335
28337
  if (ev.type === 'touchend' && this.lastTouchMove) {
28336
28338
  attachMissingTouchEventAttributes(this.lastTouchMove);
28337
- if (ev.touches.length > 0) _ev = this.lastTouchMove.touches[0];
28339
+ if (this.lastTouchMove && this.lastTouchMove.touches && this.lastTouchMove.touches.length > 0) _ev = this.lastTouchMove.touches[0];
28338
28340
  }
28339
28341
 
28340
28342
  if (!this.dragTarget) return;
@@ -29152,7 +29154,7 @@ module.exports = unhighlight;
29152
29154
  \********************/
29153
29155
  /***/ (function(module) {
29154
29156
 
29155
- var version = '6.1.4';
29157
+ var version = '6.1.6';
29156
29158
  module.exports = version;
29157
29159
 
29158
29160
  /***/ })