mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-09 18:02:50 +01:00
drag tool as alternate mode for circle
This commit is contained in:
parent
939b93410e
commit
fba94a47f5
1 changed files with 8 additions and 4 deletions
|
|
@ -40,10 +40,14 @@ export class Circle extends SketchObject {
|
|||
return Math.abs(math.distance(aim.x, aim.y, this.c.x, this.c.y) - this.r.get());
|
||||
}
|
||||
|
||||
getDefaultTool(viewer) {
|
||||
var editTool = new EditCircleTool(viewer, null);
|
||||
editTool.circle = this;
|
||||
return editTool;
|
||||
getDefaultTool(viewer, alternative) {
|
||||
if (alternative) {
|
||||
return super.getDefaultTool(viewer, alternative);
|
||||
} else {
|
||||
const editTool = new EditCircleTool(viewer, null);
|
||||
editTool.circle = this;
|
||||
return editTool;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue