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

Ionic Simulator Changing Language in settings causing issues with SVG text area components

Hi. If I change my language from en-us to anything else (european or asian) from the "User" tab in the ionic simulator and then switch the Display on and Off most of my text components disappear and any javascript code that references cause the following error:

 

Unhandled Error: text is only available for text(area) elements!

 

Is my SVG at fault perhaps? I use a gradientrect and 6 text and 2 image elements. The SVG is below and when I try and do something like this in my app index.js after a Display switch off and on I get the

error. Only happens when I hit Display off then on.:

 

//javascript app index.js

batLable.text = "some text";

 

//svg

<svg class="background">
<gradientRect id="myElement" width="100%" height="100%" pointer-events="visible"
gradient-type="linear"
gradient-x1="0" gradient-y1="50"
gradient-x2="0" gradient-y2="100%-50"
gradient-color1="silver" gradient-color2="blue"
/>
<text id="timeLable" pointer-events="visible" />
<text id="batLable" x="75%" y="92%" text-anchor="middle" class="batLable" pointer-events="visible" />
<text id="dateLable" x="50%" y="28%" text-anchor="middle" class="dateLable" pointer-events="visible"/>
<image id="heartpic" x="2%" y="82%" height="32" width="32" href="stat_hr_solid_32px.png" fill="red" />
<text id="hrm" x="13%" y="92%" class="hrm" pointer-events="visible">42</text>
<image id="stepspic" x="2%" y="1%" height="32" width="32" href="stat_steps_solid_32px.png" fill="red" />
<text id="stepLable" x="25%" y="11%" class="stepLable" pointer-events="visible"></text>
<text id="kmLable" x="78%" y="11%" class="kmLable" pointer-events="visible"></text>
</svg>

Best Answer
0 Votes
6 REPLIES 6

Hi

 

I have also tested out installing a random clock from the gallery on my ionic and changed the location in profile settings in the fitbit app and I get the same result on screen as above - text in text area's disappears.

Best Answer
0 Votes

This is a known issue, and will be fixed in a new release of the simulator soon(ish). I believe there isn't a problem with this on real watches, so it's safe to ignore.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

Hi thanks for the reply but in the meantime I have tested with random clock faces on my ionic and i see the same issue. Please try it if you get a chance. Change the location then sync and switch the display on and off. I sent an email to support describing the issue.

 

cheer

mark.

Best Answer
0 Votes

This is an issue. I imagine its been overlooked as you would have to have set up your Fitbit account before setting up a watch and would be unlikely to change your language again. I just hit the 'run' button in the simulator once have changed the language and all is ok.

On the watch, it can be solved by just swiping down, opening the today app, then going back, it then reloads the watch face with the changed language.

Best Answer
0 Votes

Hi,

Thanks for that. I was re-installing the clock to fix it - (by that I mean install another clock and then re-install the clock I originally had) so its certainly quicker just to "reload" by going to the today app. But it shouldn't really happen in the first place. Although its certainly not a big issue at all. The simulator behavior is also not an issue - hitting "run" always solves it. I was just worried that it indicated a deeper issue with my use of SVG and sub elements in my own clock face.

 

But... I think there is something strange going on. I am not 100% sure about this yet but to test I set my "Location" to manual before flying to Vienna from Amsterdam and chose Nederland (english) as the location. While in Vienna the clock face was fine. On my return I noticed that some hidden elements on my current clockface became permanently visible. I looked at my "Location" setting and it had changed to Italy. Now you cannot select Austria as a "Location" because I assume by "Location" they actually mean language, and German is the language of Austria. So that's fine. But Austria is close to Italy. And I don't know if the fitbit tries to determine "Location" automatically from GPS even when manual is selected, because my profile "Location" had changed to Italy when I flew back to Amsterdam. And I certainly saw a change in the way my current clock was presented because it showed previously hidden elements as permanently visible. I can replay this at home. I do this by resetting my clock face and replaying the location change this time manually (didn't go back and forward to Austria). I changed from Nederland to Italy and got the same effect as when I had travelled. I tried this again with another gallery clock and got the same affect. It really does seem that on some clock faces changing some "Locations" manually and also by travelling with Automatic set to off causes this issue and the extent to which elements on the watch face are hidden or made visible is different with different "Location" change combinations. E.g. going from Nederland to Italy causes no display issues, going from Italy to Nederland causes issues. 

 

Having said all of that I expect there must be thousands of iconic and versa owners travelling all of the time. But I suspect perhaps the quirk here is that "Location" is on automatic as default and this may mean that 99.9% of users don't have any issue when travelling because they never set it to manual. I only did it originally to test what would happen to units if I changed "Location" from Nederland to US - to see the change from kilometers to miles while developing a clock face.

Best Answer
0 Votes

The same "Unhandled Error: text is only available for text(area) elements!" error exists randomly in the OS Simulator 0.9.4.when changing language, and reported on totally unrelated items [to a language change].

 

How can we be sure that it will work correctly on a real Sense watch?

 

 

Author | ch, passion for improvement.

Best Answer
0 Votes