@lvce-editor/renderer-process 14.4.0 → 14.6.0
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/dist/rendererProcessMain.js +24 -3
- package/package.json +1 -1
|
@@ -766,6 +766,8 @@ const applyDragInfoMaybe = event => {
|
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
768
|
};
|
|
769
|
+
const PointerMove$1 = 'pointermove';
|
|
770
|
+
const PointerUp$1 = 'pointerup';
|
|
769
771
|
let ignore = false;
|
|
770
772
|
const startIgnore = () => {
|
|
771
773
|
ignore = true;
|
|
@@ -864,7 +866,24 @@ const preventEventsMaybe = (info, event) => {
|
|
|
864
866
|
event.stopPropagation();
|
|
865
867
|
}
|
|
866
868
|
};
|
|
867
|
-
const
|
|
869
|
+
const applyPointerTrackMaybe = (info, map, event) => {
|
|
870
|
+
const {
|
|
871
|
+
trackPointerEvents
|
|
872
|
+
} = info;
|
|
873
|
+
if (!trackPointerEvents) {
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
const {
|
|
877
|
+
target,
|
|
878
|
+
pointerId
|
|
879
|
+
} = event;
|
|
880
|
+
target.setPointerCapture(pointerId);
|
|
881
|
+
const [pointerMoveKey, pointerUpKey] = trackPointerEvents;
|
|
882
|
+
target.addEventListener(PointerMove$1, map[pointerMoveKey]);
|
|
883
|
+
// TODO use pointerlost event instead
|
|
884
|
+
target.addEventListener(PointerUp$1, map[pointerUpKey]);
|
|
885
|
+
};
|
|
886
|
+
const createFn = (info, map) => {
|
|
868
887
|
const fn = event => {
|
|
869
888
|
if (enabled()) {
|
|
870
889
|
return;
|
|
@@ -873,6 +892,7 @@ const createFn = info => {
|
|
|
873
892
|
const args = getEventListenerArgs(info.params, event);
|
|
874
893
|
preventEventsMaybe(info, event);
|
|
875
894
|
applyDragInfoMaybe(event);
|
|
895
|
+
applyPointerTrackMaybe(info, map, event);
|
|
876
896
|
if (args.length === 0) {
|
|
877
897
|
return;
|
|
878
898
|
}
|
|
@@ -890,7 +910,7 @@ const listeners = Object.create(null);
|
|
|
890
910
|
const registerEventListeners = (id, eventListeners) => {
|
|
891
911
|
const map = Object.create(null);
|
|
892
912
|
for (const info of eventListeners) {
|
|
893
|
-
const fn = createFn(info);
|
|
913
|
+
const fn = createFn(info, map);
|
|
894
914
|
map[info.name] = fn;
|
|
895
915
|
}
|
|
896
916
|
listeners[id] = map;
|
|
@@ -7932,7 +7952,8 @@ const setActionsDom$1 = (state, actions, childUid) => {
|
|
|
7932
7952
|
throw new Error(`child instance not found`);
|
|
7933
7953
|
}
|
|
7934
7954
|
const eventMap = instance.factory.EventMap;
|
|
7935
|
-
|
|
7955
|
+
setComponentUid($PanelActions, childUid);
|
|
7956
|
+
rememberFocus($PanelActions, actions, eventMap, childUid);
|
|
7936
7957
|
};
|
|
7937
7958
|
|
|
7938
7959
|
const ViewletPanel = {
|