File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
engine/modules/tooltip/src/main/resources/view/tooltip-module Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -15,8 +15,21 @@ function getMouseOutFunc (id, tooltip) {
15
15
}
16
16
}
17
17
18
+ function getEntityCurrentSubStates ( entity , frame ) {
19
+ if ( entity . states [ frame ] ) {
20
+ return entity . states [ frame ]
21
+ }
22
+ let frameNumbers = Object . keys ( entity . states )
23
+ let index = frameNumbers . length - 1
24
+
25
+ while ( index >= 0 && frameNumbers [ index ] > frame ) {
26
+ index --
27
+ }
28
+ return entity . states [ frameNumbers [ index ] ] || [ ]
29
+ }
30
+
18
31
function getEntityState ( entity , frame ) {
19
- const subStates = entity . states [ frame ]
32
+ const subStates = getEntityCurrentSubStates ( entity , frame )
20
33
if ( subStates && subStates . length ) {
21
34
return subStates [ subStates . length - 1 ]
22
35
}
You can’t perform that action at this time.
0 commit comments