package.src.symbol.anchor.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mapbox-gl Show documentation
Show all versions of mapbox-gl Show documentation
A WebGL interactive maps library
The newest version!
// @flow
import Point from '@mapbox/point-geometry';
import {register} from '../util/web_worker_transfer';
class Anchor extends Point {
angle: any;
segment: number | void;
constructor(x: number, y: number, angle: number, segment?: number) {
super(x, y);
this.angle = angle;
if (segment !== undefined) {
this.segment = segment;
}
}
clone() {
return new Anchor(this.x, this.y, this.angle, this.segment);
}
}
register('Anchor', Anchor);
export default Anchor;