Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
metexplore
MetExploreViz
Commits
68b9ec2f
Commit
68b9ec2f
authored
Jan 09, 2020
by
maxchaza
Browse files
Filter mapping combo by target biological type
parent
916cde89
Changes
6
Hide whitespace changes
Inline
Side-by-side
app/view/button/buttonImportMapping/ButtonImportMappingController.js
View file @
68b9ec2f
...
...
@@ -77,7 +77,27 @@ Ext.define('metExploreViz.view.button.buttonImportMapping.ButtonImportMappingCon
* @param mapping : Mapping object
*/
addConditions
:
function
(
mapping
)
{
var
biologicalType
;
// Launch mapping
switch
(
mapping
.
getTargetLabel
())
{
case
"
reactionDBIdentifier
"
:
biologicalType
=
"
reaction
"
;
break
;
case
"
reactionId
"
:
biologicalType
=
"
reaction
"
;
break
;
case
"
metaboliteId
"
:
biologicalType
=
"
metabolite
"
;
break
;
case
"
metaboliteDBIdentifier
"
:
biologicalType
=
"
metabolite
"
;
break
;
case
"
inchi
"
:
biologicalType
=
"
metabolite
"
;
break
;
default
:
metExploreD3
.
displayMessage
(
"
Warning
"
,
'
The type of node "
'
+
mapping
.
getTargetLabel
()
+
'
" isn
\'
t know.
'
)
}
var
conditions
=
mapping
.
getConditions
();
var
conditionStore
=
Ext
.
getStore
(
"
conditionStore
"
);
...
...
@@ -95,6 +115,6 @@ Ext.define('metExploreViz.view.button.buttonImportMapping.ButtonImportMappingCon
.
filter
(
function
(
cond
){
return
!
(
cond
.
includes
(
"
PathwayEnrichment
"
)
||
cond
.
includes
(
"
PathwayCoverage
"
))
})
.
forEach
(
function
(
value
)
{
conditionStore
.
add
({
name
:
value
,
type
:
'
int
'
});
});
.
forEach
(
function
(
value
)
{
conditionStore
.
add
({
name
:
value
,
type
:
'
int
'
,
biologicalType
:
biologicalType
});
});
}
});
app/view/form/aStyleForm/AStyleFormController.js
View file @
68b9ec2f
...
...
@@ -398,8 +398,9 @@ Ext.define('metExploreViz.view.form.aStyleForm.AStyleFormController', {
if
(
view
.
biologicalType
===
"
link
"
)
styleToUse
=
metExploreD3
.
getLinkStyle
();
if
(
!
view
.
default
)
view
.
default
=
styleToUse
[
view
.
access
];
// if(!view.default)
view
.
default
=
styleToUse
[
view
.
access
];
// WARNING Header render is executed afterrender view
// As a result, render and afterrender can't be used on header
...
...
app/view/form/allStylesByTypeForm/AllStylesByTypeFormController.js
View file @
68b9ec2f
...
...
@@ -37,6 +37,18 @@ Ext.define('metExploreViz.view.form.allStylesByTypeForm.AllStylesByTypeFormContr
view
.
on
(
{
show
:
function
biologicalTypeChange
(
sender
,
value
,
oldValue
,
eOpts
)
{
var
conditionStore
=
Ext
.
getStore
(
"
conditionStore
"
);
conditionStore
.
clearFilter
();
if
(
conditionStore
)
conditionStore
.
filter
(
function
(
map
){
if
(
view
.
title
===
"
Metabolite
"
)
return
map
.
get
(
"
biologicalType
"
)
===
"
metabolite
"
;
if
(
view
.
title
===
"
Reaction
"
||
view
.
title
===
"
Link
"
)
return
map
.
get
(
"
biologicalType
"
)
===
"
reaction
"
;
return
false
;
})
},
afterStyleLoading
:
me
.
updateForm
,
updateSelectionSet
:
me
.
updateSelection
,
afterrender
:
me
.
createCaption
,
...
...
app/view/form/metaboliteStyleForm/MetaboliteStyleForm.js
View file @
68b9ec2f
...
...
@@ -101,8 +101,19 @@ Ext.define('metExploreViz.view.form.metaboliteStyleForm.MetaboliteStyleForm', {
"
min
"
:
0
,
"
max
"
:
50
,
"
default
"
:
1
}
,{
},
// {
// "type": "string",
// "target": ["text.metabolite"],
// "attrType": "style",
// "attr": "font-size",
// "access": "fontSize",
// "biologicalType":"metabolite",
// "title": "Label",
// "choices":"",
// "default":"name"
// },
{
"
type
"
:
"
color
"
,
"
target
"
:
[
"
text.metabolite
"
],
"
attrType
"
:
"
attr
"
,
...
...
app/view/form/selectCondition/ConditionModel.js
View file @
68b9ec2f
...
...
@@ -6,6 +6,9 @@
Ext
.
define
(
'
metExploreViz.view.form.selectCondition.ConditionModel
'
,
{
extend
:
'
Ext.data.Model
'
,
fields
:
[
{
name
:
'
name
'
,
type
:
'
string
'
}
{
name
:
'
name
'
,
type
:
'
string
'
,
name
:
'
biologicalType
'
,
type
:
'
string
'
,
}
]
});
\ No newline at end of file
app/view/form/selectConditionForm/SelectConditionFormController.js
View file @
68b9ec2f
...
...
@@ -74,6 +74,10 @@ Ext.define('metExploreViz.view.form.selectConditionForm.SelectConditionFormContr
change
:
function
(
that
,
newVal
,
old
){
this
.
map
(
newVal
,
old
,
me
.
getAStyleFormParent
());
},
beforerender
:
function
(
c
)
{
var
viewAStyleForm
=
me
.
getAStyleFormParent
();
view
.
lookupReference
(
'
selectCondition
'
).
setStore
(
Ext
.
getStore
(
"
conditionStore
"
));
},
scope
:
me
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment