@leafer-ui/core 1.4.0 → 1.4.1
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.
- package/lib/core.cjs +8 -6
- package/lib/core.cjs.map +1 -1
- package/lib/core.esm.js +9 -7
- package/lib/core.esm.js.map +1 -1
- package/lib/core.esm.min.js +1 -1
- package/lib/core.esm.min.js.map +1 -1
- package/lib/core.min.cjs +1 -1
- package/lib/core.min.cjs.map +1 -1
- package/package.json +6 -6
package/lib/core.cjs
CHANGED
|
@@ -255,7 +255,7 @@ exports.DragEvent = class DragEvent extends exports.PointerEvent {
|
|
|
255
255
|
const { draggable, dragBounds } = leaf, move = leaf.getLocalPoint(total, null, true);
|
|
256
256
|
core.PointHelper.move(move, start.x - leaf.x, start.y - leaf.y);
|
|
257
257
|
if (dragBounds)
|
|
258
|
-
this.getMoveInDragBounds(leaf.
|
|
258
|
+
this.getMoveInDragBounds(leaf.__localBoxBounds, dragBounds === 'parent' ? leaf.parent.boxBounds : dragBounds, move, true);
|
|
259
259
|
if (draggable === 'x')
|
|
260
260
|
move.y = 0;
|
|
261
261
|
if (draggable === 'y')
|
|
@@ -958,7 +958,9 @@ class InteractionBase {
|
|
|
958
958
|
}
|
|
959
959
|
findPath(data, options) {
|
|
960
960
|
const { hitRadius, through } = this.p;
|
|
961
|
-
const { bottomList } = this;
|
|
961
|
+
const { bottomList, target } = this;
|
|
962
|
+
if (!core.Platform.backgrounder && !data.origin)
|
|
963
|
+
target && target.updateLayout();
|
|
962
964
|
const find = this.selector.getByPoint(data, hitRadius, Object.assign({ bottomList, name: data.type }, (options || { through })));
|
|
963
965
|
if (find.throughPath)
|
|
964
966
|
data.throughPath = find.throughPath;
|
|
@@ -1203,9 +1205,9 @@ leaf.__hitWorld = function (point) {
|
|
|
1203
1205
|
}
|
|
1204
1206
|
return this.__hit(inner);
|
|
1205
1207
|
};
|
|
1206
|
-
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
1207
|
-
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
1208
|
-
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a ===
|
|
1208
|
+
leaf.__hitFill = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitFill(inner, this.__.windingRule); };
|
|
1209
|
+
leaf.__hitStroke = function (inner, strokeWidth) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitStroke(inner, strokeWidth); };
|
|
1210
|
+
leaf.__hitPixel = function (inner) { var _a; return (_a = this.__hitCanvas) === null || _a === void 0 ? void 0 : _a.hitPixel(inner, this.__layout.renderBounds, this.__hitCanvas.hitScale); };
|
|
1209
1211
|
leaf.__drawHitPath = function (canvas) { if (canvas)
|
|
1210
1212
|
this.__drawRenderPath(canvas); };
|
|
1211
1213
|
|
|
@@ -1293,8 +1295,8 @@ function getSelector(ui) {
|
|
|
1293
1295
|
return ui.leafer ? ui.leafer.selector : (draw.Platform.selector || (draw.Platform.selector = draw.Creator.selector()));
|
|
1294
1296
|
}
|
|
1295
1297
|
draw.Group.prototype.pick = function (hitPoint, options) {
|
|
1296
|
-
this.leafer || this.updateLayout();
|
|
1297
1298
|
options || (options = draw.emptyData);
|
|
1299
|
+
this.updateLayout();
|
|
1298
1300
|
return getSelector(this).getByPoint(hitPoint, options.hitRadius || 0, Object.assign(Object.assign({}, options), { target: this }));
|
|
1299
1301
|
};
|
|
1300
1302
|
|