Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change Height and Width of Watchface Line from Settings?

Want to create a setting to all me to change the width and height of a watchface line.

 

In Resource / Index.gui

<g id="mins" pointer-events="visible" transform="translate(50%,50%)">
<rect class="showMinutes" x="$-4" y="-145" width="8" height="150" fill="white"/>
</g>

 

In App index.js

let minHand = document.getElementById("mins");

 

If I hardcode

minHand.style.height = xxx(example 101)

or

minHand.style.width = xxx(example 10)

Nothing happens.. I can change the fill just fine.. Can these two be changed programmatically??

Thx

Best Answer
0 Votes
1 REPLY 1

I think there's a couple of things going on there...

width and height are not properties of style, but of the rect element itself.

You want to change the width and height of the <rect>, and not those of the <g>, so your getElementById is getting the wrong element.

Peter McLennan
Gondwana Software
Best Answer