Gitlab CSE Unil
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
M. Chardon
ADIM
Commits
d74066cb
Commit
d74066cb
authored
Jan 18, 2017
by
M. Chardon
Browse files
maj couleur de la catégorie sur le rectangle geo
parent
8bc0d6d8
Changes
1
Show whitespace changes
Inline
Side-by-side
adim_project/adim_app/static/_src/adim/tools/rectanglegeo.js
View file @
d74066cb
...
...
@@ -105,9 +105,6 @@ define(["paper", "tools/Shape.class","adim/category"], function (paper, Shape, C
//setFill: _noop,
//setStrokeWidth: _setStrokeWidth,
//getStrokeWidth: _getStrokeWidth,
};
// Add event listeners
...
...
@@ -119,7 +116,7 @@ define(["paper", "tools/Shape.class","adim/category"], function (paper, Shape, C
newRecGeo
.
onMouseDown
=
itemMouseDown
;
newRecGeo
.
itemMouseDrag
=
itemMouseDrag
;
//
newRecGeo.onPropertyChange = itemPropertyChange;
newRecGeo
.
onPropertyChange
=
itemPropertyChange
;
newRecGeo
.
style
=
{
fillColor
:
_getColorBg
(
properties
.
category
),
...
...
@@ -307,6 +304,17 @@ define(["paper", "tools/Shape.class","adim/category"], function (paper, Shape, C
_editedSegmentIdx
=
null
;
}
function
itemPropertyChange
(
property
,
value
)
{
if
(
property
===
'
category
'
)
{
_setCategory
.
call
(
this
,
value
);
this
.
style
=
{
fillColor
:
_getColorBg
(
value
),
strokeColor
:
_getColor
(
value
)
};
paper
.
view
.
draw
();
}
}
function
cancelCreate
()
{
if
(
_drawingLine
)
_drawingLine
.
remove
();
...
...
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