mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Examples: Convert Path#selected to Path#fullySelected where needed.
This commit is contained in:
parent
80245301e7
commit
f6fbccb7a2
4 changed files with 5 additions and 5 deletions
|
@ -26,7 +26,7 @@
|
||||||
path.add(point);
|
path.add(point);
|
||||||
}
|
}
|
||||||
path.add(view.bounds.bottomRight);
|
path.add(view.bounds.bottomRight);
|
||||||
path.selected = true;
|
path.fullySelected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function onFrame(event) {
|
function onFrame(event) {
|
||||||
|
|
|
@ -34,12 +34,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMouseDown(event) {
|
function onMouseDown(event) {
|
||||||
path.selected = true;
|
path.fullySelected = true;
|
||||||
path.strokeColor = '#e08285';
|
path.strokeColor = '#e08285';
|
||||||
}
|
}
|
||||||
|
|
||||||
function onMouseUp(event) {
|
function onMouseUp(event) {
|
||||||
path.selected = false;
|
path.fullySelected = false;
|
||||||
path.strokeColor = '#e4141b';
|
path.strokeColor = '#e4141b';
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
[[width / 2, y], vector.rotate(-180), vector],
|
[[width / 2, y], vector.rotate(-180), vector],
|
||||||
[[width - offset, y], vector.rotate(90), null]
|
[[width - offset, y], vector.rotate(90), null]
|
||||||
];
|
];
|
||||||
path.selected = true;
|
path.fullySelected = true;
|
||||||
|
|
||||||
function onMouseMove(event) {
|
function onMouseMove(event) {
|
||||||
var point = event.point.clone();
|
var point = event.point.clone();
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var path = makePath();
|
var path = makePath();
|
||||||
path.selected = true;
|
path.fullySelected = true;
|
||||||
path.strokeColor = 'black';
|
path.strokeColor = 'black';
|
||||||
path.strokeCap = 'butt';
|
path.strokeCap = 'butt';
|
||||||
path.strokeJoin = 'round';
|
path.strokeJoin = 'round';
|
||||||
|
|
Loading…
Reference in a new issue