Skip to content

Commit

Permalink
avoid reapplying marker anchor class on every frame (#8018)
Browse files Browse the repository at this point in the history
  • Loading branch information
mourner authored Mar 11, 2019
1 parent 25174f2 commit e6bee15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui/marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ export default class Marker extends Evented {
this._element.addEventListener('dragstart', (e: DragEvent) => {
e.preventDefault();
});
applyAnchorClass(this._element, this._anchor, 'marker');

this._popup = null;
}

Expand Down Expand Up @@ -347,7 +349,6 @@ export default class Marker extends Evented {
}

DOM.setTransform(this._element, `${anchorTranslate[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px)`);
applyAnchorClass(this._element, this._anchor, 'marker');
}

/**
Expand Down

0 comments on commit e6bee15

Please sign in to comment.