Added merge
This commit is contained in:
@@ -18,6 +18,10 @@ DOTGRID.Tool = function () {
|
||||
this.styles[2].color = DOTGRID.theme.active.f_low
|
||||
}
|
||||
|
||||
this.erase = function () {
|
||||
this.layers = [[], [], []]
|
||||
}
|
||||
|
||||
this.reset = function () {
|
||||
this.styles[0].mirror_style = 0
|
||||
this.styles[1].mirror_style = 0
|
||||
@@ -25,7 +29,7 @@ DOTGRID.Tool = function () {
|
||||
this.styles[0].fill = 'none'
|
||||
this.styles[1].fill = 'none'
|
||||
this.styles[2].fill = 'none'
|
||||
this.layers = [[], [], []]
|
||||
this.erase()
|
||||
this.vertices = []
|
||||
this.index = 0
|
||||
}
|
||||
@@ -315,6 +319,16 @@ DOTGRID.Tool = function () {
|
||||
DOTGRID.guide.update()
|
||||
}
|
||||
|
||||
this.merge = function () {
|
||||
const merged = [].concat(this.layers[0]).concat(this.layers[1]).concat(this.layers[2])
|
||||
this.erase()
|
||||
this.layers[this.index] = merged
|
||||
|
||||
DOTGRID.history.push(this.layers)
|
||||
this.clear()
|
||||
DOTGRID.guide.update()
|
||||
}
|
||||
|
||||
// Style
|
||||
|
||||
this.style = function () {
|
||||
|
||||
Reference in New Issue
Block a user