画图按钮

This commit is contained in:
joylink_zhaoerwei 2023-06-07 14:33:46 +08:00
parent 1e3fbf06c7
commit f8be73ffde

View File

@ -106,24 +106,12 @@ export function initDrawApp(dom: HTMLElement): JlDrawApp {
const app = drawApp;
app.setOptions({
drawAssistants: [
new LinkDraw(app, () => {
return new LinkData();
}),
new RectDraw(app, () => {
return new RectData();
}),
new IscsFanDraw(app, () => {
return new IscsFanData();
}),
new PlatformDraw(app, () => {
return new PlatformData();
}),
new StationDraw(app, () => {
return new StationData();
}),
new TrainDraw(app, () => {
return new TrainData();
}),
new SignalDraw(app, () => {
return new SignalData();
}),
@ -148,30 +136,6 @@ export function initDrawApp(dom: HTMLElement): JlDrawApp {
DefaultCanvasMenu.open(e.global);
});
app.addKeyboardListener(
new KeyListener({
value: 'KeyL',
onPress: () => {
app.interactionPlugin(Link.Type).resume();
},
})
);
app.addKeyboardListener(
new KeyListener({
value: 'KeyR',
onPress: () => {
app.interactionPlugin(Rect.Type).resume();
},
})
);
app.addKeyboardListener(
new KeyListener({
value: 'KeyF',
onPress: () => {
app.interactionPlugin(IscsFan.Type).resume();
},
})
);
app.addKeyboardListener(
new KeyListener({
value: 'KeyP',
@ -182,20 +146,12 @@ export function initDrawApp(dom: HTMLElement): JlDrawApp {
);
app.addKeyboardListener(
new KeyListener({
value: 'KeyO',
value: 'KeyS',
onPress: () => {
app.interactionPlugin(Station.Type).resume();
},
})
);
app.addKeyboardListener(
new KeyListener({
value: 'KeyT',
onPress: () => {
app.interactionPlugin(Train.Type).resume();
},
})
);
app.addKeyboardListener(
new KeyListener({
value: 'KeyH',
@ -204,18 +160,6 @@ export function initDrawApp(dom: HTMLElement): JlDrawApp {
},
})
);
app.addKeyboardListener(
new KeyListener({
value: '1',
onPress: () => {
app.queryStore.queryByType<IscsFan>(IscsFan.Type).forEach((fan) => {
fan.__state = fan.__state + 1;
fan.__state = fan.__state % 5;
fan.repaint();
});
},
})
);
app.addKeyboardListener(
new KeyListener({
value: 'KeyS',