mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-16 05:23:19 +01:00
31 lines
No EOL
648 B
JavaScript
31 lines
No EOL
648 B
JavaScript
import {ReferencePointTool} from "../tools/origin";
|
|
import {IoIosHand} from "react-icons/io";
|
|
import {GiCrosshair} from "react-icons/gi";
|
|
|
|
export default [
|
|
{
|
|
id: 'PanTool',
|
|
shortName: 'Pan',
|
|
kind: 'Tool',
|
|
description: 'Pan mode',
|
|
icon: IoIosHand,
|
|
|
|
invoke: (ctx) => {
|
|
ctx.viewer.toolManager.releaseControl();
|
|
}
|
|
|
|
},
|
|
|
|
{
|
|
id: 'ReferencePointTool',
|
|
shortName: 'Set Origin',
|
|
kind: 'Tool',
|
|
description: 'Sets reference point for commands',
|
|
icon: GiCrosshair,
|
|
command: 'origin',
|
|
invoke: (ctx) => {
|
|
ctx.viewer.toolManager.takeControl(new ReferencePointTool(ctx.viewer));
|
|
}
|
|
|
|
},
|
|
] |