File tree Expand file tree Collapse file tree 4 files changed +25
-7
lines changed Expand file tree Collapse file tree 4 files changed +25
-7
lines changed Original file line number Diff line number Diff line change 1- <!--
2- Description:
1+ <!--
2+ Description:
33 Handles display grid functionality
44 Functionality includes: resizing/dragging component boxes, display grid image, active component
55 -->
@@ -162,16 +162,21 @@ Description:
162162 label =" Add your note here"
163163 filled
164164 dark
165+ autogrow
165166 max-height =15%
166167 autofocus true
167168 ></q-input >
168169 <q-btn
169170 color =" secondary"
170171 label =" Submit Note"
171- type =" submit"
172172 :disable =" noteText.length > 0 ? false : true"
173173 @click =" submitNote"
174174 />
175+ <q-btn
176+ color =" secondary"
177+ label =" Exit Notes"
178+ @click =" this.openNoteModal"
179+ />
175180 </q-form >
176181 </div >
177182 </div >
@@ -435,7 +440,7 @@ export default {
435440 },
436441 // renders modal with Update Children and Layer in it
437442 handleAddNotes (){
438- if (this .wasDragged === false ){
443+ if (this .wasDragged === false && this . activeComponent !== ' ' ){
439444 this .openNoteModal ();
440445 }
441446 },
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import * as types from "./types";
44const actions = {
55 // Actions that primarily affect componentDisplay.vue //////
66 [ types . deleteActiveComponent ] : ( { state, commit } ) => {
7+ if ( state . noteModalOpen === true ) {
8+ return ;
9+ }
710 commit ( types . DELETE_ACTIVE_COMPONENT ) ;
811 const activeRouteArray = [ ...state . routes [ state . activeRoute ] ] ;
912 const newActiveRouteArray = activeRouteArray . filter (
@@ -290,6 +293,7 @@ const actions = {
290293 // Loading ///////////////////////////////////////////////////////
291294
292295 [ types . openProject ] : ( { commit, state } , payload ) => {
296+ commit ( types . REMOVE_ALL_STATE_PROPS_ACTIONS )
293297 payload . userProps . forEach ( ( prop ) => { commit ( types . CREATE_PROP , prop ) } )
294298 payload . userActions . forEach ( ( action ) => { commit ( types . CREATE_ACTION , action ) } )
295299 payload . userState . forEach ( ( state ) => { commit ( types . CREATE_STATE , state ) } )
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import {
1414} from "../utils/search.util" ;
1515import _ from "lodash" ;
1616
17+
1718const cloneDeep = require ( "lodash.clonedeep" ) ;
1819
1920const mutations = {
@@ -22,9 +23,18 @@ const mutations = {
2223 payload . store . replaceState ( cloneDeep ( payload . initialState ) ) ;
2324 } ,
2425
26+ [ types . REMOVE_ALL_STATE_PROPS_ACTIONS ] : ( state ) => {
27+ const emptyObj = {
28+ userProps : [ ] ,
29+ userState : [ ] ,
30+ userActions : [ ] ,
31+ }
32+ Object . assign ( state , emptyObj )
33+ } ,
34+
2535 [ types . TOGGLE_TUTORIAL ] : ( state ) => {
2636 state . showTutorial = ! state . showTutorial ;
27- } ,
37+ } ,
2838
2939 // *** ROUTES *** //////////////////////////////////////////////
3040 [ types . ADD_ROUTE ] : ( state , payload ) => {
@@ -186,8 +196,6 @@ const mutations = {
186196 }
187197 }
188198 state . selectedState = [ ] ;
189- // state.activeComponentObj = null;
190- // state.activeComponentObj = active;
191199 state . activeComponentObj = { ...active } ;
192200
193201 state . componentMap = {
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ export const TOGGLE_TUTORIAL = 'TOGGLE_TUTORIAL'
6767export const ADD_ACTIVE_COMPONENT_NOTE = 'ADD_ACTIVE_COMPONENT_NOTE'
6868export const DELETE_ACTIVE_COMPONENT_NOTE = 'DELETE_ACTIVE_COMPONENT_NOTE'
6969export const OPEN_NOTE_MODAL = 'OPEN_NOTE_MODAL'
70+ export const REMOVE_ALL_STATE_PROPS_ACTIONS = 'REMOVE_ALL_STATE_PROPS_ACTIONS'
7071
7172// Actions
7273export const openNoteModal = 'openNoteModal'
You can’t perform that action at this time.
0 commit comments