File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,10 @@ export class MapView extends BaseElement {
5151 this . relY = 15
5252 this . onClick = ( cx : number , cy : number ) => {
5353 if ( this . entityBelowCursor ) EventBroker . publish ( new FollowerSetLookAtEvent ( this . entityBelowCursor ) )
54- const surfaceScale = this . surfaceRectSizeMin / this . surfaceRectSize
55- this . offset . x += ( cx - this . x - this . width / 2 ) * surfaceScale
56- this . offset . y += ( cy - this . y - this . height / 2 ) * surfaceScale
57- this . offset . x = Math . max ( - this . width / 2 , Math . min ( this . terrainWidth * this . surfaceRectSizeMin - this . width / 2 , this . offset . x ) )
58- this . offset . y = Math . max ( - this . height / 2 , Math . min ( this . terrainHeight * this . surfaceRectSizeMin - this . height / 2 , this . offset . y ) )
54+ this . offset . x += ( cx - this . x - this . width / 2 )
55+ this . offset . y += ( cy - this . y - this . height / 2 )
56+ this . offset . x = Math . max ( - this . width / 2 , Math . min ( this . terrainWidth * this . surfaceRectSize - this . width / 2 , this . offset . x ) )
57+ this . offset . y = Math . max ( - this . height / 2 , Math . min ( this . terrainHeight * this . surfaceRectSize - this . height / 2 , this . offset . y ) )
5958 this . redrawAll ( )
6059 }
6160 this . registerEventListener ( EventKey . INIT_RADAR_MAP , ( event : InitRadarMap ) => {
You can’t perform that action at this time.
0 commit comments