File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,11 @@ class Label extends THREE.Object3D {
134
134
}
135
135
136
136
updateCSSPosition ( ) {
137
- this . content . style [ STYLE_TRANSFORM ] = `translate(${ this . boundaries . left + this . padding } px, ${ this . boundaries . top + this . padding } px)` ;
137
+ this . content . style [ STYLE_TRANSFORM ] = `translate(${
138
+ this . projectedPosition . x + this . offset . left
139
+ } px, ${
140
+ this . projectedPosition . y + this . offset . top
141
+ } px)`;
138
142
}
139
143
140
144
/**
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ describe('Label', function () {
148
148
149
149
label . updateProjectedPosition ( 10.4 , 10.6 ) ;
150
150
label . updateCSSPosition ( ) ;
151
- assert . equal ( label . content . style . transform , 'translate(15.4px, 15.6px )' ) ;
151
+ assert . equal ( label . content . style . transform , 'translate(15px, 16px )' ) ;
152
152
} ) ;
153
153
154
154
it ( 'updates the horizon culling point' , function ( ) {
You can’t perform that action at this time.
0 commit comments