UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

6 lines (5 loc) 1.41 kB
/* All material copyright ESRI, All Rights Reserved, unless otherwise specified. See https://js.arcgis.com/4.33/esri/copyright.txt for details. */ 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 n extends i{constructor({targetPoint:e,constraint:i,previousVertex:r,otherVertex:s,otherVertexType:n,isDraped:o,selfSnappingType:h,objectId:a,domain:x}){super(e,i,o,x??t.SELF),this.previousVertex=r,this.otherVertex=s,this.otherVertexType=n,this.selfSnappingType=h??p.None,this.objectId=a??null}get hints(){const t=this.previousVertex,i=this.otherVertexType===o.CENTER?this.otherVertex:this.targetPoint,n=this.otherVertexType===o.CENTER?this.targetPoint:this.otherVertex;return[new r(e.TARGET,i,n,this.isDraped,this.domain),new r(e.REFERENCE,t,i,this.isDraped,this.domain),new s(this.previousVertex,i,n,this.isDraped,this.domain)]}}var o,p;!function(t){t[t.NEXT=0]="NEXT",t[t.CENTER=1]="CENTER"}(o||(o={})),function(t){t[t.None=0]="None",t[t.LastVertex=1]="LastVertex",t[t.FirstVertex=2]="FirstVertex",t[t.ExistingEdge=3]="ExistingEdge"}(p||(p={}));export{o as OtherVertexType,n as RightAngleSnappingCandidate,p as SelfSnappingRightAngleType};