@lvce-editor/renderer-process 30.39.0 → 30.41.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/editorOnlyRendererProcessMain.js +14 -0
- package/dist/rendererProcessMain.js +1275 -1197
- package/package.json +1 -1
|
@@ -2619,6 +2619,18 @@ const focusSelectorAfterRender = (uid, selector) => {
|
|
|
2619
2619
|
});
|
|
2620
2620
|
});
|
|
2621
2621
|
};
|
|
2622
|
+
const scrollSelectorBy = (uid, selector, delta) => {
|
|
2623
|
+
const element = getElement(uid).querySelector(selector);
|
|
2624
|
+
if (element) {
|
|
2625
|
+
element.scrollLeft += delta;
|
|
2626
|
+
}
|
|
2627
|
+
};
|
|
2628
|
+
const scrollSelectorIntoView = (uid, selector) => {
|
|
2629
|
+
getElement(uid).querySelector(selector)?.scrollIntoView({
|
|
2630
|
+
block: 'nearest',
|
|
2631
|
+
inline: 'nearest'
|
|
2632
|
+
});
|
|
2633
|
+
};
|
|
2622
2634
|
const setBounds = (uid, left, top, width, height) => {
|
|
2623
2635
|
const element = getElement(uid);
|
|
2624
2636
|
element.style.left = `${left}px`;
|
|
@@ -2664,6 +2676,8 @@ const commandHandlers = {
|
|
|
2664
2676
|
'Viewlet.dispose': dispose,
|
|
2665
2677
|
'Viewlet.focusSelector': focusSelector,
|
|
2666
2678
|
'Viewlet.focusSelectorAfterRender': focusSelectorAfterRender,
|
|
2679
|
+
'Viewlet.scrollSelectorBy': scrollSelectorBy,
|
|
2680
|
+
'Viewlet.scrollSelectorIntoView': scrollSelectorIntoView,
|
|
2667
2681
|
'Viewlet.setAdditionalFocus': ignoreCommand,
|
|
2668
2682
|
'Viewlet.setBounds': setBounds,
|
|
2669
2683
|
'Viewlet.setCss': addCssStyleSheet,
|