Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Montag, 14. Mai 2018, 12:45

"use-strict" mode leads to initialization Error in all versions of plugin

Hello there,

I've come across with initialization Krpano Viewer Error while setting "use-scrict" mode in Javascript. I can't just switch it off because too much functionality depends upon this mode in other modules.

To represent this Error I've built a codepen example (https://codepen.io/anon/pen/LmBPvm )-> open developer console to see the Error message.

According my observations it happens due to setting Uint8Array.length = 0, when in 'strict mode' assignment to read-only properties is not allowed

Please help me to solve this problem.

2

Montag, 14. Mai 2018, 18:30

Hi,

make sure that the "use strict" is defined within the krpanoplugin function object, everything outside of it will be ignored and skipped.

E.g.

Quellcode

1
2
3
4
5
function krpanoplugin()
{
  "use strict";
  ....
}


Best regards,
Klaus

3

Dienstag, 15. Mai 2018, 08:29

Unfortunately it doesn't help

Klaus,


Thank you for your suggestion, but unfortunately it doesn't solve my problem.
Did you have a chance to check out the link that I've attached to the post?
The problem still exists whenever I put 'use-strict' mode, and it's only disappears when I remove 'use-strict' definition from JS file.


Could you please, check out error example link and suggest another solution?

4

Dienstag, 15. Mai 2018, 09:18

Hi,

just enable the strict mode only for your own code...

Why would you need to add it to the krpano files itself?

Best regards,
Klaus

5

Mittwoch, 16. Mai 2018, 13:39

Hi,


Let me explain the situation itself. We make an SPA where a couple of pages depends on krpano plugin, so we use Webpack to manage JS bundle.


If I decide to switch off --use-strict mode for all imported dependencies at may leed to future errors. So, I hope that this behaviour will be fixed in future releases.

We use krpano files itself to give users ability to manage hotspots that they have built in Panotour (icons, position etc)

Regards,
Maksim