03-26-2018 18:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-26-2018 18:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello,
I'm trying to move the text tag horizontally to the left based on the hour value. The style.x javascript method does not appear to work. Do you have any other solutions please?
<svg class="background"> <text id="myHour" /> <text id="myMinutes" /> </svg>
const MYMINUTES = document.getElementById("myMinutes");
if (preferences.clockDisplay === "12h") { // 12h format hours = hours % 12 || 12; } else { // 24h format hours = util.zeroPad(hours); }
//Readjust min position based on hour if (hours < 10) { MYMINUTES.style.x='30%+10'; } else { MYMINUTES.style.x='50%+10'; }
Answered! Go to the Best Answer.

Accepted Solutions
03-26-2018 19:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-26-2018 19:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Try just MYMINUTES.x. I've done something similar and that sort of thing worked for me.
Gondwana Software
03-26-2018 19:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


03-26-2018 19:03
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Try just MYMINUTES.x. I've done something similar and that sort of thing worked for me.
Gondwana Software
03-26-2018 20:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

03-26-2018 20:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
That worked! Thank you

