Changeset 35543
- Timestamp:
- 2021-10-01T15:08:29+13:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/WordTimingSelector.vue
r35542 r35543 10 10 11 11 <span v-if="isMounted && !isProduction" class="material-icons mdi-m word-handle" :style="{ left: leftHandleLeft }" 12 @mouse move="onMinHandleMouseMove" @mouseup="onHandleMouseUp" @mousedown="canShiftMinValue = true">12 @mousedown="canShiftMinValue = true"> 13 13 first_page 14 14 </span> 15 <span v-if="isMounted && !isProduction" class="material-icons mdi-m word-handle" :style="{ left: rightHandleLeft }" @mousemove="onMaxHandleMouseMove">last_page</span> 15 <span v-if="isMounted && !isProduction" class="material-icons mdi-m word-handle" :style="{ left: rightHandleLeft }" 16 @mousedown="canShiftMaxValue = true"> 17 last_page 18 </span> 16 19 </div> 17 20 … … 204 207 return word === this.myWord; 205 208 }, 209 onDocumentMouseMove(event) { 210 if (this.canShiftMinValue) { 211 this.onMinHandleMouseMove(event); 212 } 213 else if (this.canShiftMaxValue) { 214 this.onMaxHandleMouseMove(event); 215 } 216 }, 206 217 /** 207 218 * @param {MouseEvent} event … … 224 235 this.mySurroundingWords[this.wordIndex].left += event.movementX; 225 236 word.length -= event.movementX; 237 238 this.myWordToWord(); 226 239 }, 227 240 onMaxHandleMouseMove(event) { … … 243 256 244 257 word.length += event.movementX; 258 245 259 this.myWordToWord(); 246 260 }, 247 on HandleMouseUp() {261 onDocumentMouseUp() { 248 262 this.canShiftMinValue = false; 249 263 this.canShiftMaxValue = false; … … 265 279 mounted() { 266 280 this.isMounted = true; 281 282 document.addEventListener("mousemove", this.onDocumentMouseMove); 283 document.addEventListener("mouseup", this.onDocumentMouseUp); 284 }, 285 beforeUnmount() { 286 document.removeEventListener("mousemove", this.onDocumentMouseMove); 287 document.removeEventListener("mouseup", this.onDocumentMouseUp); 267 288 } 268 289 }
Note:
See TracChangeset
for help on using the changeset viewer.