@@ -12,6 +12,7 @@ export default class SelectableAreaComponent extends Component {
1212 @tracked currSubId = this . args . model ?. id || null ;
1313 @tracked selecting = this . args . makingSelection || false ;
1414 @tracked showing = this . args . showingSelections || false ;
15+ @tracked selections = [ ] ;
1516 currentSelections = null ;
1617 imageTagging = null ;
1718 selectionHighlighting = null ;
@@ -26,12 +27,14 @@ export default class SelectableAreaComponent extends Component {
2627
2728 @action
2829 initializeSelectionTools ( ) {
30+ console . log ( 'Initializing selection tools...' ) ;
2931 if ( this . _toolsInitialized ) return ;
3032 this . _toolsInitialized = true ;
3133
3234 const containerId = 'submission_container' ;
3335 const scrollableContainer = 'al_submission' ;
3436 const container = document . getElementById ( containerId ) ;
37+ console . log ( 'Container:' , container ) ;
3538
3639 if ( ! container ) return ;
3740
@@ -44,7 +47,10 @@ export default class SelectableAreaComponent extends Component {
4447 automaticEvent : ! this . isTouchScreen ,
4548 } ) ;
4649
50+ console . log ( 'SelectionHighlighting:' , this . selectionHighlighting ) ;
51+
4752 this . selectionHighlighting . init ( ( id ) => {
53+ console . log ( 'Selection created with ID:' , id ) ;
4854 const selection = this . selectionHighlighting . getSelection ( id ) ;
4955 selection . selectionType = 'selection' ;
5056 this . args . addSelection ( selection ) ;
@@ -67,6 +73,8 @@ export default class SelectableAreaComponent extends Component {
6773 this . imageTagging . loadTags ( this . imgTags ) ;
6874 this . imageTagging . enable ( ) ;
6975
76+ console . log ( 'about to load selections:' , this . selections ) ;
77+
7078 this . selectionHighlighting . loadSelections ( this . selections ) ;
7179
7280 if ( this . args . showingSelections ) {
0 commit comments