Skip to content

Commit

Permalink
Layers
Browse files Browse the repository at this point in the history
  • Loading branch information
denishov committed Dec 17, 2023
1 parent 3519237 commit b01ab11
Show file tree
Hide file tree
Showing 12 changed files with 474 additions and 295 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ module.exports = {
files: [
'app/views/scripts/components/Tools.vue',
'app/views/scripts/components/Embed.vue',
'app/views/scripts/components/Data.vue'
'app/views/scripts/components/Data.vue',
'app/views/scripts/components/LayersManager.vue'
],
rules: {
'max-lines': 'off',
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": "explicit"
},
"[javascript][vue]": {
"editor.formatOnSave": false
Expand Down
10 changes: 0 additions & 10 deletions app/public/js/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,16 +67,6 @@
"scriptPath": "/js/tools/draw.js",
"iconPath": "/img/draw.svg"
},
{
"name": "Layers",
"id": "layers",
"desc": "",
"exportedVar": [
"ToolLayers"
],
"scriptPath": "/js/tools/layers.js",
"iconPath": "/img/layers.svg"
},
{
"name": "DrawPolygon",
"id": "drawPolygon",
Expand Down
2 changes: 1 addition & 1 deletion app/public/js/microdraw.js
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ const Microdraw = (function () {
me.viewerOpenImage(me.ImageInfo[me.currentImage]);

// update layers if there's any
me.tools.layers.updateLayers();
window.dispatchEvent(new CustomEvent('updateMicrodrawLayers'));
},

/**
Expand Down
273 changes: 0 additions & 273 deletions app/public/js/tools/layers.js

This file was deleted.

11 changes: 10 additions & 1 deletion app/views/scripts/components/Data.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<Header v-if="!fullscreen">
<span class="title">MicroDraw</span>
</Header>
<main :class="{ fullscreen }">
<main
class="editor"
:class="{ fullscreen }"
>
<OntologySelector
:ontology="ontology"
:open="displayOntology"
Expand All @@ -18,6 +21,10 @@
<Tools />
</template>
<template #content>
<LayersManager
:open="displayLayers"
@on-close="displayLayers = false"
/>
<div
id="microdraw"
style="width: 100%; height: 100%"
Expand All @@ -37,13 +44,15 @@ import * as Vue from 'vue';
import useVisualization from '../store/visualization';
import LayersManager from './LayersManager.vue';
import Tools from './Tools.vue';
const {
title,
displayChat,
displayScript,
displayOntology,
displayLayers,
currentLabel,
ontology,
fullscreen,
Expand Down
9 changes: 8 additions & 1 deletion app/views/scripts/components/Embed.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<main>
<main class="editor">
<OntologySelector
:ontology="ontology"
:open="displayOntology"
Expand All @@ -15,6 +15,11 @@
<Tools />
</template>
<template #content>
<LayersManager
:open="displayLayers"
@on-close="displayLayers = false"
/>

<div
id="microdraw"
style="width: 100%; height: 100%"
Expand Down Expand Up @@ -46,6 +51,7 @@ import * as Vue from 'vue';
import useVisualization from '../store/visualization';
import LayersManager from './LayersManager.vue';
import Tools from './Tools.vue';
Expand All @@ -70,6 +76,7 @@ const {
displayChat,
displayScript,
displayOntology,
displayLayers,
currentLabel,
ontology,
fullscreen,
Expand Down
Loading

0 comments on commit b01ab11

Please sign in to comment.