Changeset 35604 for main


Ignore:
Timestamp:
2021-10-15T10:53:57+13:00 (3 years ago)
Author:
cstephen
Message:

Complete left handle adjustment logic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/WordTimingSelector.vue

    r35603 r35604  
    310310                    }
    311311
    312                     const diff = word.left - previousWord.right(); // Will be negative
     312                    previousWord.length += amount;
     313                    const leftBoundary = previousWord.left + this.scaleTime(0.1);
     314
     315                    if (previousWord.right() > leftBoundary) {
     316                        return;
     317                    }
     318
     319                    const diff = word.left - leftBoundary; // Will be negative
    313320                    word.left -= diff;
    314321                    word.length += diff;
    315 
    316                     // TODO: This logic needs all words to be reactively updated to work
    317 
    318                     // previousWord.length += amount;
    319                     // const leftBoundary = previousWord.left + this.timeToPosition(0.1);
    320 
    321                     // if (previousWord.right() > leftBoundary) {
    322                     //     return;
    323                     // }
    324 
    325                     // const diff = leftBoundary - previousWord.right(); // Will be negative
    326                     // word.left -= diff;
    327                     // word.length += diff;
    328                     // previousWord.length -= diff;
     322                    previousWord.length -= diff;
    329323                }
    330324            }
Note: See TracChangeset for help on using the changeset viewer.