@doegis/core
Version:
DOE GIS API
3 lines (1 loc) • 1.02 kB
JavaScript
import{SnappingDomain as t}from"../SnappingDomain.js";import{LineSegmentHintType as e}from"../snappingUtils.js";import{SnappingCandidate as i}from"./SnappingCandidate.js";import{LineSnappingHint as r}from"../hints/LineSnappingHint.js";import{RightAngleSnappingHint as s}from"../hints/RightAngleSnappingHint.js";class o extends i{constructor({targetPoint:e,constraint:i,previousVertex:r,otherVertex:s,otherVertexType:o,objectId:n,isDraped:h}){super(e,i,h,t.SELF),this.previousVertex=r,this.otherVertex=s,this.otherVertexType=o,this.objectId=n}get hints(){const t=this.previousVertex,i=this.otherVertexType===n.CENTER?this.otherVertex:this.targetPoint,o=this.otherVertexType===n.CENTER?this.targetPoint:this.otherVertex;return[new r(e.TARGET,i,o,this.isDraped,this.domain),new r(e.REFERENCE,t,i,this.isDraped,this.domain),new s(this.previousVertex,i,o,this.isDraped,this.domain)]}}var n;!function(t){t[t.NEXT=0]="NEXT",t[t.CENTER=1]="CENTER"}(n||(n={}));export{n as OtherVertexType,o as RightAngleSnappingCandidate};