feature: exclude object map (#369)
* feature: add 2D object map (testing) * feature: 2D map for objects * chore: update materialdesignicons * feature: move exclude object map and list in a seperate dialog * feature: add hover function to display hovered object in the map * feature: colorize border of current object * feature: click on object in map to cancel object * feature: add mobile support for exclude object dialog Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
1 parent
dd2c8c58ca
commit
a81a486602
8 files changed
+449
-88
No files matched your search
@@ -0,0 +1,50 @@
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<template v-for="object in printing_objects">
|
||||
<v-row v-bind:key="'div_'+object.name" class="py-3 d-flex" @mouseover="mouseOverObject(object.name)" @mouseleave="mouseOverObject('')">
|
||||
<v-col class="py-2 subtitle-2 text--disabled text-truncate">
|
||||
{{ object.name }}
|
||||
</v-col>
|
||||
<v-col class="col-auto py-2">
|
||||
<v-chip pill small class="text--disabled" v-if="excluded_objects.includes(object.name)">{{ $t('Panels.StatusPanel.ExcludeObject.Excluded') }}</v-chip>
|
||||
<v-icon class="text--disabled cursor-pointer" @click="openExcludeObjectDialog(object.name)" small v-else>mdi-close-circle</v-icon>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-divider v-bind:key="'divider_'+object.name" ></v-divider>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import Component from 'vue-class-component'
|
||||
import {Mixins} from 'vue-property-decorator'
|
||||
import BaseMixin from '@/components/mixins/base'
|
||||
|
||||
@Component
|
||||
export default class StatusPanelObjectsDialogList extends Mixins(BaseMixin) {
|
||||
get printing_objects() {
|
||||
return this.$store.state.printer.exclude_object?.objects ?? []
|
||||
}
|
||||
|
||||
get current_object() {
|
||||
return this.$store.state.printer.exclude_object?.current_object ?? null
|
||||
}
|
||||
|
||||
get excluded_objects() {
|
||||
return this.$store.state.printer.exclude_object?.excluded_objects ?? []
|
||||
}
|
||||
|
||||
openExcludeObjectDialog(name: string) {
|
||||
this.$emit('update:name', name)
|
||||
this.$emit('update:bool', true)
|
||||
}
|
||||
|
||||
mouseOverObject(name: string) {
|
||||
this.$emit('update:hoverName', name)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Reference in new issue
Block a user