Adding greedy indication

This commit is contained in:
Jeff Avallone 2014-12-15 12:43:13 -05:00
parent c0eed07d9b
commit f4ea4d6da6
2 changed files with 13 additions and 1 deletions

View File

@ -22,6 +22,12 @@ export default _.extend({}, Base, {
vert: Math.max(0, box.ay - box.y - 10), vert: Math.max(0, box.ay - box.y - 10),
horiz: box.width - 10 horiz: box.width - 10
})); }));
if (!this._repeat.greedy()) {
paths.push(Snap.format('M0,{box.ay}m10,-15l5,5m-5,-5l-5,5', {
box
}));
}
} }
if (this._repeat.hasLoop()) { if (this._repeat.hasLoop()) {
@ -29,6 +35,12 @@ export default _.extend({}, Base, {
box, box,
vert: box.y2 - box.ay - 10 vert: box.y2 - box.ay - 10
})); }));
if (this._repeat.greedy()) {
paths.push(Snap.format('M{box.x2},{box.ay}m10,15l5,-5m-5,5l-5,-5', {
box
}));
}
} }
if (paths.length) { if (paths.length) {

View File

@ -8,7 +8,7 @@ export default {
}, },
greedy() { greedy() {
return (this._greedy.textValue !== ''); return (this._greedy.textValue === '');
}, },
hasSkip() { hasSkip() {