Bug fixed with header

This commit is contained in:
Luis Fernando Molina committed 2020-01-15 22:31:40 +01:00
1 parent f55679072d
commit d59561473a
4 files changed
+25 -25

No files matched your search

+9 -9
View File
@@ -452,20 +452,20 @@ function newLayer () {
roundedCornersBackground(params)
if (label2 !== undefined) {
drawLabel(label1, 1 / 2, 2 / 8, 16, thisObject.container)
drawLabel(label2, 1 / 2, 4 / 8, 16, thisObject.container)
drawLabel(label1, 1 / 2, 2 / 8, 0, 0, 16, thisObject.container)
drawLabel(label2, 1 / 2, 4 / 8, 0, 0, 16, thisObject.container)
} else {
drawLabel(label1, 1 / 2, 3 / 8, 20, thisObject.container)
drawLabel(label1, 1 / 2, 3 / 8, 0, 0, 20, thisObject.container)
}
drawLabel(label3, 1 / 2, 6 / 8, 10, thisObject.container)
drawLabel(label4, 1 / 2, 7 / 8, 10, thisObject.container)
drawLabel(label3, 1 / 2, 6 / 8, 0, 0, 10, thisObject.container)
drawLabel(label4, 1 / 2, 7 / 8, 0, 0, 10, thisObject.container)
/* Images */
drawIcon(icon1, 1 / 8, 1 / 4, 20, thisObject.container)
drawIcon(icon2, 7 / 8, 1 / 4, 20, thisObject.container)
drawIcon(icon3, 1 / 8, 3 / 4, 20, thisObject.container)
drawIcon(icon4, 7 / 8, 3 / 4, 20, thisObject.container)
drawIcon(icon1, 1 / 8, 1 / 4, 0, 0, 20, thisObject.container)
drawIcon(icon2, 7 / 8, 1 / 4, 0, 0, 20, thisObject.container)
drawIcon(icon3, 1 / 8, 3 / 4, 0, 0, 20, thisObject.container)
drawIcon(icon4, 7 / 8, 3 / 4, 0, 0, 20, thisObject.container)
}
}
+4 -4
View File
@@ -325,10 +325,10 @@ function newProductsPanel () {
roundedCornersBackground(params)
drawLabel(label1, 1 / 2, 6 / 100, 10, thisObject.container)
drawLabel(label2, 1 / 2, 9 / 100, 10, thisObject.container)
drawLabel(label1, 1 / 2, 0, 0, 20, 10, thisObject.container)
drawLabel(label2, 1 / 2, 0, 0, 40, 10, thisObject.container)
drawIcon(icon1, 1 / 8, 6 / 100, 40, thisObject.container)
drawIcon(icon2, 7 / 8, 6 / 100, 40, thisObject.container)
drawIcon(icon1, 1 / 8, 0, 0, 20, 40, thisObject.container)
drawIcon(icon2, 7 / 8, 0, 0, 40, 40, thisObject.container)
}
}
+5 -5
View File
@@ -21,12 +21,12 @@ function drawScaleDisplay (label1, label2, label3, xExtraOffSet1, xExtraOffSet2,
label2 = label2.substring(0, 20)
label3 = label3.substring(0, 20)
drawLabel(label1, 1 / 2, 4 / 5, 10, container)
drawLabel(label2, 1 / 2, 2 / 5, 20, container)
drawLabel(label3, 1 / 2, 3 / 5, 10, container)
drawLabel(label1, 1 / 2, 4 / 5, 0, 0, 10, container)
drawLabel(label2, 1 / 2, 2 / 5, 0, 0, 20, container)
drawLabel(label3, 1 / 2, 3 / 5, 0, 0, 10, container)
drawIcon(icon1, 1 / 8, 1 / 2, 40, container)
drawIcon(icon2, 7 / 8, 1 / 2, 40, container)
drawIcon(icon1, 1 / 8, 1 / 2, 0, 0, 40, container)
drawIcon(icon2, 7 / 8, 1 / 2, 0, 0, 40, container)
}
function drawScaleDisplayCover (container) {
+7 -7
View File
@@ -105,13 +105,13 @@ function roundedCornersBackground (params) {
browserCanvasContext.stroke()
}
function drawLabel (label, xFactor, yFactor, fontSize, container) {
function drawLabel (label, xFactor, yFactor, xOffset, yOffset, fontSize, container) {
if (label === undefined) { return }
let xOffset = label.length * fontSize * FONT_ASPECT_RATIO + 10
let fontOffset = label.length * fontSize * FONT_ASPECT_RATIO + 10
let labelPoint = {
x: container.frame.width * xFactor - xOffset / 2,
y: container.frame.height * yFactor
x: container.frame.width * xFactor + xOffset - fontOffset / 2,
y: container.frame.height * yFactor + yOffset
}
labelPoint = container.frame.frameThisPoint(labelPoint)
@@ -122,12 +122,12 @@ function drawLabel (label, xFactor, yFactor, fontSize, container) {
browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y)
}
function drawIcon (icon, xFactor, yFactor, imageSize, container) {
function drawIcon (icon, xFactor, yFactor, xOffset, yOffset, imageSize, container) {
if (icon !== undefined) {
if (icon.canDrawIcon === true) {
let imagePosition = {
x: container.frame.width * xFactor - imageSize / 2,
y: container.frame.height * yFactor - imageSize / 2
x: container.frame.width * xFactor + xOffset - imageSize / 2,
y: container.frame.height * yFactor + yOffset - imageSize / 2
}
imagePosition = container.frame.frameThisPoint(imagePosition)