Fixes #71, issue with history
This commit is contained in:
@@ -101,6 +101,8 @@ function Client () {
|
||||
this.renderer.start()
|
||||
this.interface.start()
|
||||
|
||||
this.history.push(this.layers) // initial state
|
||||
|
||||
this.source.new()
|
||||
this.onResize()
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ function Acels (client) {
|
||||
|
||||
this.order = []
|
||||
this.all = {}
|
||||
this.roles = {}
|
||||
this.pipe = null
|
||||
|
||||
this.install = (host = document.body) => {
|
||||
@@ -40,10 +39,6 @@ function Acels (client) {
|
||||
this.all[accelerator] = { cat, name, downfn, upfn, accelerator }
|
||||
}
|
||||
|
||||
this.add = (cat, role) => {
|
||||
this.all[':' + role] = { cat, name: role, role }
|
||||
}
|
||||
|
||||
this.get = (accelerator) => {
|
||||
return this.all[accelerator]
|
||||
}
|
||||
|
||||
@@ -20,10 +20,6 @@ function Tool (client) {
|
||||
this.styles[2].color = client.theme.active.f_low
|
||||
}
|
||||
|
||||
this.erase = function () {
|
||||
this.layers = [[], [], []]
|
||||
}
|
||||
|
||||
this.reset = function () {
|
||||
this.styles[0].mirror_style = 0
|
||||
this.styles[1].mirror_style = 0
|
||||
@@ -36,6 +32,13 @@ function Tool (client) {
|
||||
this.index = 0
|
||||
}
|
||||
|
||||
this.erase = function () {
|
||||
this.layers = [[], [], []]
|
||||
this.vertices = []
|
||||
client.renderer.update()
|
||||
client.interface.update(true)
|
||||
}
|
||||
|
||||
this.clear = function () {
|
||||
this.vertices = []
|
||||
client.renderer.update()
|
||||
|
||||
Reference in New Issue
Block a user