remove unused event bindings

This commit is contained in:
Stewart Allen 2025-12-25 12:54:21 -05:00
commit 195bbc1964
3 changed files with 2 additions and 17 deletions

View file

@ -1,7 +1,6 @@
/** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */ /** Copyright Stewart Allen <sa@grid.space> -- All Rights Reserved */
import { $ } from '../../../moto/webui.js'; import { $ } from '../../../moto/webui.js';
import { api } from '../api.js';
export function bind() { export function bind() {
return { return {

View file

@ -129,14 +129,6 @@ function startLeftAlign() {
startIt(); startIt();
} }
api.event.on('tool.camera.focus', startFocus);
api.event.on('tool.mesh.face-up', startFaceUp);
api.event.on('tool.mesh.lay-flat', startLayFlat);
api.event.on('tool.mesh.lefty', startLeftAlign);
function scale() { function scale() {
let cam = space.internals().camera; let cam = space.internals().camera;
let dist = cam.position.distanceTo(pmesh.position); let dist = cam.position.distanceTo(pmesh.position);
@ -145,8 +137,6 @@ function scale() {
pmesh.scale.set(scale,scale,scale); pmesh.scale.set(scale,scale,scale);
} }
api.event.on("space.view.zoom", scale);
api.event.on('mouse.hover', (ev) => { api.event.on('mouse.hover', (ev) => {
if (!enabled) { if (!enabled) {
return; return;
@ -194,7 +184,6 @@ api.event.on('mouse.hover.up', (ev) => {
endIt(); endIt();
}); });
export { export {
cleanup, cleanup,
endIt, endIt,

View file

@ -9,6 +9,7 @@ import { selectHoles } from './cl-hole.js';
import { selectHelical } from './cl-helical.js'; import { selectHelical } from './cl-helical.js';
import { surfaceAdd } from './cl-surface.js'; import { surfaceAdd } from './cl-surface.js';
import { traceAdd } from './cl-trace.js'; import { traceAdd } from './cl-trace.js';
import { startFaceUp } from '../../app/tools.js';
const { MODES } = api.const; const { MODES } = api.const;
const { uc: UC } = api; const { uc: UC } = api;
@ -592,17 +593,13 @@ export function createPopOps() {
action: UC.newRow([UC.newButton(LANG.edit, gcodeEditor())], { class: "ext-buttons f-row" }) action: UC.newRow([UC.newButton(LANG.edit, gcodeEditor())], { class: "ext-buttons f-row" })
}; };
function angleTowardZUp() {
api.event.emit('tool.mesh.face-up');
}
createPopOp('index', { createPopOp('index', {
degrees: 'camIndexAxis', degrees: 'camIndexAxis',
absolute: 'camIndexAbs' absolute: 'camIndexAbs'
}).inputs = { }).inputs = {
degrees: UC.newInput(LANG.ci_degr_s, { title: LANG.ci_degr_l, convert: toFloat, bound: UC.bound(-360, 360.0) }), degrees: UC.newInput(LANG.ci_degr_s, { title: LANG.ci_degr_l, convert: toFloat, bound: UC.bound(-360, 360.0) }),
absolute: UC.newBoolean(LANG.ci_abso_s, undefined, { title: LANG.ci_abso_l }), absolute: UC.newBoolean(LANG.ci_abso_s, undefined, { title: LANG.ci_abso_l }),
select: UC.newRow([UC.newButton(LANG.ci_face_s, angleTowardZUp)], { class: "ext-buttons f-row" }) select: UC.newRow([UC.newButton(LANG.ci_face_s, startFaceUp)], { class: "ext-buttons f-row" })
}; };
const editEnable = gcodeEditor('Laser Enable Script', 'enable'); const editEnable = gcodeEditor('Laser Enable Script', 'enable');