Commit a067234c authored by Riegel's avatar Riegel
Browse files

Add model placing to context menu

parent b0f5a114
...@@ -417,6 +417,15 @@ export default function smartVillagesPlugin(config, baseUrl) { ...@@ -417,6 +417,15 @@ export default function smartVillagesPlugin(config, baseUrl) {
const pick = vcsApp.maps.activeMap.getScene().pick(event.windowPosition); const pick = vcsApp.maps.activeMap.getScene().pick(event.windowPosition);
if (pick !== undefined && pick.primitive !== undefined && pick.primitive.id !== undefined) { if (pick !== undefined && pick.primitive !== undefined && pick.primitive.id !== undefined) {
model = pick.primitive.id model = pick.primitive.id
actions.push({
id: 'move',
name: 'Objekt platzieren',
callback() {
const interaction = new PickPlaceInteraction();
interaction.setActive(EventType.CLICKMOVE);
activeMouseEvent = vcsApp.maps.eventHandler.addExclusiveInteraction(interaction, () => { console.log("removed") });
},
});
actions.push({ actions.push({
id: 'move', id: 'move',
name: 'Objekt verschieben', name: 'Objekt verschieben',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment