1212
1313// This is used for other views' cursors.
1414
15- class OtherViewCursorSection extends HTMLObjectSection {
15+ class TextCursorSection extends HTMLObjectSection {
1616 documentObject : boolean = true ;
1717 interactable : boolean = false ; // We don't bother with events.
1818 zIndex : number = app . CSections . DefaultForDocumentObjects . processingOrder ;
@@ -21,7 +21,7 @@ class OtherViewCursorSection extends HTMLObjectSection {
2121 app . CSections . DefaultForDocumentObjects . processingOrder ;
2222
2323 static sectionNamePrefix = 'OtherViewCursor ' ;
24- static sectionPointers : Array < OtherViewCursorSection > = [ ] ;
24+ static sectionPointers : Array < TextCursorSection > = [ ] ;
2525
2626 constructor (
2727 viewId : number ,
@@ -31,7 +31,7 @@ class OtherViewCursorSection extends HTMLObjectSection {
3131 mode : number ,
3232 ) {
3333 super (
34- OtherViewCursorSection . sectionNamePrefix + viewId ,
34+ TextCursorSection . sectionNamePrefix + viewId ,
3535 rectangle . pWidth / app . dpiScale ,
3636 rectangle . pHeight / app . dpiScale ,
3737 new cool . SimplePoint ( rectangle . x1 , rectangle . y1 ) ,
@@ -95,12 +95,12 @@ class OtherViewCursorSection extends HTMLObjectSection {
9595
9696 rectangle . pWidth = 2 * app . dpiScale ; // Width of the cursor.
9797
98- const sectionName = OtherViewCursorSection . sectionNamePrefix + viewId ;
99- let section : OtherViewCursorSection ;
98+ const sectionName = TextCursorSection . sectionNamePrefix + viewId ;
99+ let section : TextCursorSection ;
100100 if ( app . sectionContainer . doesSectionExist ( sectionName ) ) {
101101 section = app . sectionContainer . getSectionWithName (
102102 sectionName ,
103- ) as OtherViewCursorSection ;
103+ ) as TextCursorSection ;
104104 section . sectionProperties . part = part ;
105105 section . sectionProperties . mode = mode ;
106106 section . size [ 0 ] = rectangle . pWidth ;
@@ -113,15 +113,15 @@ class OtherViewCursorSection extends HTMLObjectSection {
113113
114114 section . setPosition ( rectangle . pX1 , rectangle . pY1 ) ;
115115 } else {
116- section = new OtherViewCursorSection (
116+ section = new TextCursorSection (
117117 viewId ,
118118 color ,
119119 rectangle ,
120120 part ,
121121 mode ,
122122 ) ;
123123 app . sectionContainer . addSection ( section ) ;
124- OtherViewCursorSection . sectionPointers . push ( section ) ;
124+ TextCursorSection . sectionPointers . push ( section ) ;
125125 }
126126
127127 section . setShowSection ( section . checkMyVisibility ( ) ) ;
@@ -144,13 +144,13 @@ class OtherViewCursorSection extends HTMLObjectSection {
144144 }
145145
146146 public static removeView ( viewId : number ) {
147- const sectionName = OtherViewCursorSection . sectionNamePrefix + viewId ;
147+ const sectionName = TextCursorSection . sectionNamePrefix + viewId ;
148148 if ( app . sectionContainer . doesSectionExist ( sectionName ) ) {
149149 const section = app . sectionContainer . getSectionWithName (
150150 sectionName ,
151- ) as OtherViewCursorSection ;
152- OtherViewCursorSection . sectionPointers . splice (
153- OtherViewCursorSection . sectionPointers . indexOf ( section ) ,
151+ ) as TextCursorSection ;
152+ TextCursorSection . sectionPointers . splice (
153+ TextCursorSection . sectionPointers . indexOf ( section ) ,
154154 1 ,
155155 ) ;
156156 app . sectionContainer . removeSection ( sectionName ) ;
@@ -159,20 +159,20 @@ class OtherViewCursorSection extends HTMLObjectSection {
159159 }
160160
161161 public static doesViewCursorSectionExist ( viewId : number ) {
162- const name = OtherViewCursorSection . sectionNamePrefix + viewId ;
162+ const name = TextCursorSection . sectionNamePrefix + viewId ;
163163 return app . sectionContainer . doesSectionExist ( name ) ;
164164 }
165165
166166 public static getViewCursorSection ( viewId : number ) {
167- if ( OtherViewCursorSection . doesViewCursorSectionExist ( viewId ) ) {
168- const name = OtherViewCursorSection . sectionNamePrefix + viewId ;
167+ if ( TextCursorSection . doesViewCursorSectionExist ( viewId ) ) {
168+ const name = TextCursorSection . sectionNamePrefix + viewId ;
169169 return app . sectionContainer . getSectionWithName ( name ) ;
170170 } else return null ;
171171 }
172172
173173 public static updateVisibilities ( hideCursors : boolean = false ) {
174- for ( let i = 0 ; i < OtherViewCursorSection . sectionPointers . length ; i ++ ) {
175- const section = OtherViewCursorSection . sectionPointers [ i ] ;
174+ for ( let i = 0 ; i < TextCursorSection . sectionPointers . length ; i ++ ) {
175+ const section = TextCursorSection . sectionPointers [ i ] ;
176176 section . setShowSection ( section . checkMyVisibility ( ) ) ;
177177 if ( hideCursors ) section . getHTMLObject ( ) . style . opacity = '0' ;
178178 else section . getHTMLObject ( ) . style . opacity = '1' ;
0 commit comments