File tree Expand file tree Collapse file tree 4 files changed +24
-8
lines changed Expand file tree Collapse file tree 4 files changed +24
-8
lines changed Original file line number Diff line number Diff line change 1
- <!--
2
- Description:
1
+ <!--
2
+ Description:
3
3
Handles display grid functionality
4
4
Functionality includes: resizing/dragging component boxes, display grid image, active component
5
5
-->
@@ -162,16 +162,21 @@ Description:
162
162
label =" Add your note here"
163
163
filled
164
164
dark
165
+ autogrow
165
166
max-height =15%
166
167
autofocus true
167
168
></q-input >
168
169
<q-btn
169
170
color =" secondary"
170
171
label =" Submit Note"
171
- type =" submit"
172
172
:disable =" noteText.length > 0 ? false : true"
173
173
@click =" submitNote"
174
174
/>
175
+ <q-btn
176
+ color =" secondary"
177
+ label =" Exit Notes"
178
+ @click =" this.openNoteModal"
179
+ />
175
180
</q-form >
176
181
</div >
177
182
</div >
@@ -435,7 +440,7 @@ export default {
435
440
},
436
441
// renders modal with Update Children and Layer in it
437
442
handleAddNotes (){
438
- if (this .wasDragged === false ){
443
+ if (this .wasDragged === false && this . activeComponent !== ' ' ){
439
444
this .openNoteModal ();
440
445
}
441
446
},
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ import * as types from "./types";
4
4
const actions = {
5
5
// Actions that primarily affect componentDisplay.vue //////
6
6
[ types . deleteActiveComponent ] : ( { state, commit } ) => {
7
+ if ( state . noteModalOpen === true ) {
8
+ return ;
9
+ }
7
10
commit ( types . DELETE_ACTIVE_COMPONENT ) ;
8
11
const activeRouteArray = [ ...state . routes [ state . activeRoute ] ] ;
9
12
const newActiveRouteArray = activeRouteArray . filter (
@@ -290,6 +293,7 @@ const actions = {
290
293
// Loading ///////////////////////////////////////////////////////
291
294
292
295
[ types . openProject ] : ( { commit, state } , payload ) => {
296
+ commit ( types . REMOVE_ALL_STATE_PROPS_ACTIONS )
293
297
payload . userProps . forEach ( ( prop ) => { commit ( types . CREATE_PROP , prop ) } )
294
298
payload . userActions . forEach ( ( action ) => { commit ( types . CREATE_ACTION , action ) } )
295
299
payload . userState . forEach ( ( state ) => { commit ( types . CREATE_STATE , state ) } )
Original file line number Diff line number Diff line change @@ -14,17 +14,25 @@ import {
14
14
} from "../utils/search.util" ;
15
15
import _ from "lodash" ;
16
16
17
+
17
18
const cloneDeep = require ( "lodash.clonedeep" ) ;
18
19
19
20
const mutations = {
20
21
// invoked on undo, resetsstate to a cdeep clone of the initial state
21
22
[ types . EMPTY_STATE ] : ( state , payload ) => {
22
23
payload . store . replaceState ( cloneDeep ( payload . initialState ) ) ;
23
24
} ,
24
-
25
+ [ types . REMOVE_ALL_STATE_PROPS_ACTIONS ] : ( state ) => {
26
+ const emptyObj = {
27
+ userProps : [ ] ,
28
+ userState : [ ] ,
29
+ userActions : [ ] ,
30
+ }
31
+ Object . assign ( state , emptyObj )
32
+ } ,
25
33
[ types . TOGGLE_TUTORIAL ] : ( state ) => {
26
34
state . showTutorial = ! state . showTutorial ;
27
- } ,
35
+ } ,
28
36
29
37
// *** ROUTES *** //////////////////////////////////////////////
30
38
[ types . ADD_ROUTE ] : ( state , payload ) => {
@@ -186,8 +194,6 @@ const mutations = {
186
194
}
187
195
}
188
196
state . selectedState = [ ] ;
189
- // state.activeComponentObj = null;
190
- // state.activeComponentObj = active;
191
197
state . activeComponentObj = { ...active } ;
192
198
193
199
state . componentMap = {
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ export const TOGGLE_TUTORIAL = 'TOGGLE_TUTORIAL'
67
67
export const ADD_ACTIVE_COMPONENT_NOTE = 'ADD_ACTIVE_COMPONENT_NOTE'
68
68
export const DELETE_ACTIVE_COMPONENT_NOTE = 'DELETE_ACTIVE_COMPONENT_NOTE'
69
69
export const OPEN_NOTE_MODAL = 'OPEN_NOTE_MODAL'
70
+ export const REMOVE_ALL_STATE_PROPS_ACTIONS = 'REMOVE_ALL_STATE_PROPS_ACTIONS'
70
71
71
72
// Actions
72
73
export const openNoteModal = 'openNoteModal'
You can’t perform that action at this time.
0 commit comments