@@ -106,7 +106,7 @@ function findBlipCoordinates(blip, minRadius, maxRadius, startAngle, allBlipCoor
106106function blipAssistiveText ( blip ) {
107107 return blip . isGroup ( )
108108 ? `\`${ blip . ring ( ) . name ( ) } ring, group of ${ blip . blipText ( ) } `
109- : `${ blip . ring ( ) . name ( ) } ring, ${ blip . name ( ) } , ${ blip . isNew ( ) ? 'new' : 'existing' } blip .`
109+ : `${ blip . ring ( ) . name ( ) } ring, ${ blip . name ( ) } , ${ blip . status ( ) } .`
110110}
111111function addOuterCircle ( parentSvg , order , scale = 1 ) {
112112 parentSvg
@@ -120,6 +120,66 @@ function addOuterCircle(parentSvg, order, scale = 1) {
120120 . style ( 'transform' , `scale(${ scale } )` )
121121}
122122
123+ function addMovedInLine ( parentSvg , order , scale = 1 ) {
124+ let path
125+
126+ switch ( order ) {
127+ case 'first' :
128+ path =
129+ 'M16.5 34.44c0-.86.7-1.56 1.56-1.56c8.16 0 14.8-6.64 14.8-14.8c0-.86.7-1.56 1.56-1.56c.86 0 1.56.7 1.56 1.56C36 27.96 27.96 36 18.07 36C17.2 36 16.5 35.3 16.5 34.44z'
130+ break
131+ case 'second' :
132+ path =
133+ 'M16.5 1.56c0 .86.7 1.56 1.56 1.56c8.16 0 14.8 6.64 14.8 14.8c0 .86.7 1.56 1.56 1.56c.86 0 1.56-.7 1.56-1.56C36 8.04 27.96 0 18.07 0C17.2 0 16.5.7 16.5 1.56z'
134+ break
135+ case 'third' :
136+ path =
137+ 'M19.5 34.44c0-.86-.7-1.56-1.56-1.56c-8.16 0-14.8-6.64-14.8-14.8c0-.86-.7-1.56-1.56-1.56S0 17.2 0 18.07C0 27.96 8.04 36 17.93 36C18.8 36 19.5 35.3 19.5 34.44z'
138+ break
139+ case 'fourth' :
140+ path =
141+ 'M19.5 1.56c0 0.86-0.7 1.56-1.56 1.56c-8.16 0-14.8 6.64-14.8 14.8c0 0.86-0.7 1.56-1.56 1.56S0 18.8 0 17.93C0 8.04 8.04 0 17.93 0C18.8 0 19.5 0.7 19.5 1.56z'
142+ break
143+ }
144+
145+ parentSvg
146+ . append ( 'path' )
147+ . attr ( 'opacity' , '1' )
148+ . attr ( 'class' , order )
149+ . attr ( 'd' , path )
150+ . style ( 'transform' , `scale(${ scale } )` )
151+ }
152+
153+ function addMovedOutLine ( parentSvg , order , scale = 1 ) {
154+ let path
155+
156+ switch ( order ) {
157+ case 'first' :
158+ path =
159+ 'M19.5 1.56c0 0.86-0.7 1.56-1.56 1.56c-8.16 0-14.8 6.64-14.8 14.8c0 0.86-0.7 1.56-1.56 1.56S0 18.8 0 17.93C0 8.04 8.04 0 17.93 0C18.8 0 19.5 0.7 19.5 1.56z'
160+ break
161+ case 'second' :
162+ path =
163+ 'M19.5 34.44c0-.86-.7-1.56-1.56-1.56c-8.16 0-14.8-6.64-14.8-14.8c0-.86-.7-1.56-1.56-1.56S0 17.2 0 18.07C0 27.96 8.04 36 17.93 36C18.8 36 19.5 35.3 19.5 34.44z'
164+ break
165+ case 'third' :
166+ path =
167+ 'M16.5 1.56c0 .86.7 1.56 1.56 1.56c8.16 0 14.8 6.64 14.8 14.8c0 .86.7 1.56 1.56 1.56c.86 0 1.56-.7 1.56-1.56C36 8.04 27.96 0 18.07 0C17.2 0 16.5.7 16.5 1.56z'
168+ break
169+ case 'fourth' :
170+ path =
171+ 'M16.5 34.44c0-.86.7-1.56 1.56-1.56c8.16 0 14.8-6.64 14.8-14.8c0-.86.7-1.56 1.56-1.56c.86 0 1.56.7 1.56 1.56C36 27.96 27.96 36 18.07 36C17.2 36 16.5 35.3 16.5 34.44z'
172+ break
173+ }
174+
175+ parentSvg
176+ . append ( 'path' )
177+ . attr ( 'opacity' , '1' )
178+ . attr ( 'class' , order )
179+ . attr ( 'd' , path )
180+ . style ( 'transform' , `scale(${ scale } )` )
181+ }
182+
123183function drawBlipCircle ( group , blip , xValue , yValue , order ) {
124184 group
125185 . attr ( 'transform' , `scale(1) translate(${ xValue - 16 } , ${ yValue - 16 } )` )
@@ -138,6 +198,16 @@ function newBlip(blip, xValue, yValue, order, group) {
138198 addOuterCircle ( group , order , blip . scale )
139199}
140200
201+ function movedInBlip ( blip , xValue , yValue , order , group ) {
202+ drawBlipCircle ( group , blip , xValue , yValue , order )
203+ addMovedInLine ( group , order , blip . scale )
204+ }
205+
206+ function movedOutBlip ( blip , xValue , yValue , order , group ) {
207+ drawBlipCircle ( group , blip , xValue , yValue , order )
208+ addMovedOutLine ( group , order , blip . scale )
209+ }
210+
141211function existingBlip ( blip , xValue , yValue , order , group ) {
142212 drawBlipCircle ( group , blip , xValue , yValue , order )
143213}
@@ -175,6 +245,10 @@ function drawBlipInCoordinates(blip, coordinates, order, quadrantGroup) {
175245 groupBlip ( blip , x , y , order , group )
176246 } else if ( blip . isNew ( ) ) {
177247 newBlip ( blip , x , y , order , group )
248+ } else if ( blip . hasMovedIn ( ) ) {
249+ movedInBlip ( blip , x , y , order , group )
250+ } else if ( blip . hasMovedOut ( ) ) {
251+ movedOutBlip ( blip , x , y , order , group )
178252 } else {
179253 existingBlip ( blip , x , y , order , group )
180254 }
0 commit comments