Removed comment

This commit is contained in:
neauoire
2020-03-24 20:24:49 +09:00
parent 90368d28d8
commit a3e5b28e7d
4 changed files with 19 additions and 17 deletions

View File

@@ -103,7 +103,9 @@ function Client () {
this.source.new()
this.onResize()
setTimeout(() => { document.body.className += ' ready' }, 250)
this.interface.update(true) // force an update
setTimeout(() => { document.body.className += ' ready'; }, 250)
}
this.update = () => {

View File

@@ -10,13 +10,7 @@ function Interface (client) {
this.isVisible = true
this.zoom = false
this.install = function (host) {
host.appendChild(this.el)
}
this.start = function (host) {
let html = ''
const options = {
const options = {
cast: {
line: { key: 'A', icon: 'M60,60 L240,240' },
arc_c: { key: 'S', icon: 'M60,60 A180,180 0 0,1 240,240' },
@@ -43,6 +37,13 @@ function Interface (client) {
}
}
this.install = function (host) {
host.appendChild(this.el)
}
this.start = function (host) {
let html = ''
for (const type in options) {
const tools = options[type]
for (const name in tools) {

View File

@@ -229,7 +229,6 @@ function Tool (client) {
// Cannot cast close twice
if (type === 'close') {
const prev = this.layer()[this.layer().length - 1]
console.log(this.vertices.length)
if (!prev || prev.type === 'close' || this.vertices.length !== 0) {
return false
}