# HG changeset patch # User Nicholas Jillings # Date 1506422259 -3600 # Node ID be98bbeea41ae4ef186b8265e53ef487fcdfb7e1 # Parent ae0950bc1c99e018cddb3ed29d7c34a92bc0c44f Implemented #78 for Mushra diff -r ae0950bc1c99 -r be98bbeea41a interfaces/mushra.js --- a/interfaces/mushra.js Tue Sep 26 11:22:47 2017 +0100 +++ b/interfaces/mushra.js Tue Sep 26 11:37:39 2017 +0100 @@ -470,6 +470,14 @@ function drawScale() { var interfaceObj = testState.currentStateMap.interfaces[0]; var scales = testState.currentStateMap.interfaces[0].scales; + var ticks = specification.interfaces.options.concat(interfaceObj.options).find(function (a) { + return (a.type == "show" && a.name == "ticks"); + }); + if (ticks !== undefined) { + ticks = true; + } else { + ticks = false; + } scales = scales.sort(function (a, b) { return a.position - b.position; }); @@ -485,11 +493,13 @@ scales.forEach(function (scale) { var posPercent = scale.position / 100.0; var posPix = (1 - posPercent) * (draw_heights[1] - draw_heights[0]) + draw_heights[0]; - ctx.fillStyle = "#000000"; - ctx.setLineDash([1, 2]); - ctx.moveTo(0, posPix); - ctx.lineTo(width, posPix); - ctx.stroke(); + if (ticks) { + ctx.fillStyle = "#000000"; + ctx.setLineDash([1, 2]); + ctx.moveTo(0, posPix); + ctx.lineTo(width, posPix); + ctx.stroke(); + } var text = document.createElement('div'); text.align = "right"; var textC = document.createElement('span');