Fixed issue with mirrors

This commit is contained in:
Devine Lu Linvega 2019-01-10 15:37:13 +12:00
parent f307e4a4aa
commit 9335cd3b12
3 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ body { padding: 0px; font-family: 'input_mono_regular'; -webkit-user-select: non
/* Interface */ /* Interface */
#interface { font-size: 11px;line-height: 30px;text-transform: uppercase;-webkit-app-region: no-drag; transition: all 150ms; width: 100%; position:fixed; bottom:20px; left:35px; height:30px; max-width:calc(100vw - 80px); overflow: hidden;} #interface { font-size: 11px;line-height: 30px;text-transform: uppercase;-webkit-app-region: no-drag; transition: all 150ms; width: 100%; position:fixed; bottom:20px; left:45px; height:30px; max-width:calc(100vw - 85px); overflow: hidden;}
#interface.hidden { bottom:10px;opacity: 0 } #interface.hidden { bottom:10px;opacity: 0 }
#interface.visible { bottom:20px; opacity: 1 } #interface.visible { bottom:20px; opacity: 1 }
#interface #menu { opacity: 1; position: absolute; top:0px; transition: all 250ms; z-index: 900; overflow: hidden; height:30px; width:100%;} #interface #menu { opacity: 1; position: absolute; top:0px; transition: all 250ms; z-index: 900; overflow: hidden; height:30px; width:100%;}

View File

@ -11,7 +11,7 @@ function Generator (layer, style) {
const seg = l[k1] const seg = l[k1]
for (const k2 in seg.vertices) { for (const k2 in seg.vertices) {
if (mirror == 1 || mirror == 3) { seg.vertices[k2].x = (DOTGRID.tool.settings.size.width) - seg.vertices[k2].x + 15 } if (mirror == 1 || mirror == 3) { seg.vertices[k2].x = (DOTGRID.tool.settings.size.width) - seg.vertices[k2].x + 15 }
if (mirror == 2 || mirror == 3) { seg.vertices[k2].y = (DOTGRID.tool.settings.size.height) - seg.vertices[k2].y + 30 } if (mirror == 2 || mirror == 3) { seg.vertices[k2].y = (DOTGRID.tool.settings.size.height) - seg.vertices[k2].y + 15 }
// Offset // Offset
seg.vertices[k2].x += offset.x seg.vertices[k2].x += offset.x

View File

@ -65,7 +65,7 @@ function Renderer (dotgrid) {
if (dotgrid.tool.style().mirror_style === 0 && dotgrid.tool.settings.crest === false) { return } if (dotgrid.tool.style().mirror_style === 0 && dotgrid.tool.settings.crest === false) { return }
const middle = { x: dotgrid.tool.settings.size.width + 15, y: dotgrid.tool.settings.size.height + (this.scale * 15) } const middle = { x: dotgrid.tool.settings.size.width + 15, y: dotgrid.tool.settings.size.height + 15 }
if (dotgrid.tool.style().mirror_style === 1 || dotgrid.tool.style().mirror_style === 3 || dotgrid.tool.settings.crest === true) { if (dotgrid.tool.style().mirror_style === 1 || dotgrid.tool.style().mirror_style === 3 || dotgrid.tool.settings.crest === true) {
this.drawRule({ x: middle.x, y: 15 * this.scale }, { x: middle.x, y: (dotgrid.tool.settings.size.height + 15) * this.scale }) this.drawRule({ x: middle.x, y: 15 * this.scale }, { x: middle.x, y: (dotgrid.tool.settings.size.height + 15) * this.scale })