From 808a7aedc58eb974c695ba9ab13d3f0f6118e214 Mon Sep 17 00:00:00 2001 From: Fabien Benetou <fabien-services@benetou.fr> Date: Thu, 25 May 2023 12:05:12 +0200 Subject: [PATCH] hide source editor, might cause pinching conflicts --- index.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 90a1878..a37a9bc 100644 --- a/index.html +++ b/index.html @@ -3092,8 +3092,16 @@ function onNextPinchSplitReader(){ let checkForNewPinches = setInterval( _ => { if (selectedElements.filter( e => e.primary ).length > lastPrimary){ let id = getIdFromPick() // applies on primary only -console.log('pinched to split', id, getEditorFromId( id )) - if (id) splitEditorHorizontally( getEditorFromId( id ) ) + if (id) { + let srcEditor = getEditorFromId( id ) + let editorParts = splitEditorHorizontally( srcEditor ) + // could position based on hands positions + // should hide or even delete older one + srcEditor.element.setAttribute('visible', false) + // could display a line between current pinch and secondary hand + // or temporary transparency on the 2 new editors + // could attach on hand indexes + } clearInterval(checkForNewPinches) } }, 50) // relatively cheap check, filtering on small array