Sie sind nicht angemeldet.

1

Freitag, 26. Oktober 2012, 11:13

HTML5 plugin rendering

I'm creating a JS plugin for my Panorama. However, text appears to be rather blurry sometimes when I rotate my pano (Safari, Mac). I have found the cause, it's due to the webkit-transform values not being rounded.

IE: webkit-transform: translate(217.09142528458045px, 225.4742243902969px)

I tried doing a Math.round around the WebKitPoint's in the krpanoiphone.js file without any luck (the values just weren't being rounded). Maybe that was the wrong place to do so, but the code is a little hard to read. I'm not sure where else I can look. Does anyone here have any suggestions, so I can sharpen up my JS plugin(s)?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Sam Granger« (26. Oktober 2012, 12:33)


2

Dienstag, 30. Oktober 2012, 10:20

Hi,

is your question related to hotspots?
because the positions of normal plugin/layer elements are already rounded by default (can be changed by the accuracy setting)

best regards,
Klaus

3

Dienstag, 30. Oktober 2012, 13:49

It is a hotspot, but setting accuracy in <hotspot> doesn't do the trick here. IE:

<krpano>
<hotspot name="label17" url="/layouts/trainstation/clients/tjs/panorama/plugins/sortable.js" alturl="/layouts/trainstation/clients/tjs/panorama/plugins/sortable.js" enabled="true" ath="-79" atv="9" keep="true" edge="lefttop" accuracy="0" todo="1" label="Pompen" id="7" subjects="{"87":"Kennis brandstoffen 1"}"/>
</krpano>



Also tried using accuracy="1"

Still blurry however. Hotspot files are included via an <include> by the way - not sure if that makes a difference?

4

Dienstag, 30. Oktober 2012, 13:55

Hi,
It is a hotspot, but setting accuracy in <hotspot> doesn't do the trick here.
as said - that's only for plugin/layer elements! - that was why I asking if you were using a hotspot .
I will try to add an optional setting for enabling position rounding for hotspot in of the next release.
By default this will not be enabled, because still would case bad-looking 'jumping' movements.

Still blurry however. Hotspot files are included via an <include> by the way - not sure if that makes a difference?
The <include> is only relevant at the xml-declaration and parsing stage, but doesn't affect the working of anything.

Best regards,
Klaus

5

Dienstag, 30. Oktober 2012, 14:00

Thanks, that'd be nice - I can't really use a <plugin> due to not being able to set ath/atv.

Looking forward to seeing this in the next version! :)

6

Dienstag, 30. Oktober 2012, 14:04

A temporary workaround might be using the onviewchange event and the spheretoscreen action to calculate the x/y position for the <plugin> element manually...