Implemented picker

This commit is contained in:
Devine Lu Linvega
2018-03-07 13:50:41 +13:00
parent 813d26873e
commit 10b0b3e0ce
13 changed files with 155 additions and 17 deletions

View File

@@ -3,12 +3,17 @@ function Interface()
this.el = document.createElement("div");
this.el.id = "interface";
this.el.appendChild(this.menu_el = document.createElement("div"));
this.menu_el.id = "menu";
this.is_visible = true;
this.zoom = false;
this.start = function()
{
document.getElementById("app").appendChild(this.el);
this.el.appendChild(dotgrid.picker.el);
var html = ""
var tools = {
line: ["line","M60,60 L240,240",""],
@@ -31,7 +36,7 @@ function Interface()
var tool = tools[id];
html += `<svg id="${id}" ar="${id}" title="${tool[0]}" viewBox="0 0 300 300" class="icon"><path class="icon_path" d="${tool[1]}"/>${id == "depth" ? `<path class="icon_path inactive" d=""/>` : ""}<rect ar="${id}" width="300" height="300" opacity="0"><title>${id}</title></rect></svg>`
}
this.el.innerHTML = html
this.menu_el.innerHTML = html
}
this.update = function()