File tree Expand file tree Collapse file tree 2 files changed +14
-13
lines changed
Expand file tree Collapse file tree 2 files changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -208,19 +208,19 @@ export class Device extends Sprite {
208208 // Create the square as a selection marker
209209 this . highlightMarker = new Graphics ( ) ;
210210
211- // Increase the square size
212- const size = this . width ; // Side length of the square, now larger
213-
214- // Draw a square using moveTo and lineTo
215- this . highlightMarker . moveTo ( - size / 2 , - size / 2 ) ; // Move to the top left corner of the centered square
216- this . highlightMarker . lineTo ( size / 2 , - size / 2 ) ; // Top line
217- this . highlightMarker . lineTo ( size / 2 , size / 2 ) ; // Right line
218- this . highlightMarker . lineTo ( - size / 2 , size / 2 ) ; // Bottom line
219- this . highlightMarker . lineTo ( - size / 2 , - size / 2 ) ; // Left line, closes the square
220-
221- // Change color to red and increase line thickness
222- this . highlightMarker . stroke ( { width : 3 , color : Colors . Violet } ) ; // Red and thicker
223-
211+ this . highlightMarker . roundRect (
212+ - this . width / 2 ,
213+ - this . height / 2 ,
214+ this . width ,
215+ this . height ,
216+ 5 ,
217+ ) ;
218+ this . highlightMarker . stroke ( {
219+ width : 3 ,
220+ color : Colors . Violet ,
221+ alpha : 0.6 ,
222+ } ) ;
223+ this . highlightMarker . fill ( { color : Colors . Violet , alpha : 0.1 } ) ;
224224 this . highlightMarker . zIndex = ZIndexLevels . Device ;
225225
226226 // Ensure the marker is in the same container as the viewport
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export enum Colors {
88 Red = 0xff0000 ,
99 White = 0xffffff ,
1010 Black = 0x000000 ,
11+ Yellow = 0xffff00 ,
1112}
1213
1314export function circleGraphicsContext (
You can’t perform that action at this time.
0 commit comments