InteractionAngle

선분을 그리고 해당 선분의 각도를 구하기 위한 사용자 입력(마우스/키보드) 클래스.
User input class for angle measurement using mouse/keyboard input.

new Ditap.InteractionAngle(angleOption)

Name Type Description
angleOption object 다음과 같은 속성을 가진 객체.
Object with the following properties:
Name Type Description
addCallback function optional 선분(또는 측정)이 완료될 때 실행되는 콜백 함수.
Callback function executed after measuring the angle.
measurementAngle MeasurementAngle optional 각도 계산 및 선분 표시 클래스.
Angle calculation and line display class.
Example:
// 샌드캐슬 예제 'DiTAP - Angle Measurement' 참조

const viewer = new Ditap.DitapViewer("ditapContainer");

const measurementAngle = new Ditap.MeasurementAngle(viewer);

// InteractionAngle on/off 실행 시 MeasurementAngle 초기화 필수
// measurementAngle 초기화 방법
// 1. InteractionAngle 생성 후, MeasurementAngle, callback 함수 대입
const interactionAngle = new Ditap.InteractionAngle();
interactionAngle.measurementAngle = measurementAngle;
interactionAngle.addCallback = () => {};

// 2. InteractionAngle 생성 시, angleOption 지정
const angleOption = {
   measurementAngle: measurementAngle,
   addCallback: () => {}
};
const interactionAngle = new Ditap.InteractionAngle(angleOption);

Members

addCallback : function

측정이 완료될 때 실행되는 콜백 함수.
Callback function executed when angle measurement is completed.

readonly isOn : boolean

핸들러 비/활성화.
Handler enabled or disabled.

measurementAngle : MeasurementAngle

각도 계산 및 선분 표시 클래스.
Angle calculation and line display class.

Methods

abort()

측정 중 중단.
Interrupt during measurement.

createMobileEvent()

모바일 전용 이벤트 추가.

destroy()

객체의 리소스 파괴.
Destroy resources held by this object.

off()

각도 측정 핸들러 종료. (MeasurementAngle 초기화 필수.)
End angle measurement handler. (MeasurementAngle initialization required.)

on()

각도 측정 핸들러 실행. (MeasurementAngle 초기화 필수.)
Execute angle measurement handler. (MeasurementAngle initialization required.)

removeMobileEvent()

모바일 전용 이벤트 제거.

removePoint()

포인트 제거.
Remove Point.