vue-krpano icon indicating copy to clipboard operation
vue-krpano copied to clipboard

About Krpano player

Open zhuyuanwen opened this issue 7 years ago • 6 comments

Hi, I'd like to konw what do you mean "Krpano player"? And how to set the globally reference? (I use the vue2.0 +webpack 1.x)

zhuyuanwen avatar May 10 '17 08:05 zhuyuanwen

The Krpano player is a Panorama viewer which is widely used in the industry. You can find more details at https://krpano.com/ It is a commercial software that you have to pay for the license. Once you get the copy, you reference the JS library globally by using the

chshapple avatar May 10 '17 08:05 chshapple

I have bought the krpano license. And the

zhuyuanwen avatar May 10 '17 23:05 zhuyuanwen

I was trying to put the krpano engine into the webpack bundle, however, it arose some unexpected exceptions. krpano seems has some trouble in conjunction with the module system. I will try to figure out a proper solution.

chshapple avatar May 11 '17 03:05 chshapple

Thinks!

And I found a new question below:

activekrpanowindow: "krpano_64555" activeElement :div#krpano_64555

The element id is not the default value "krpanoSWFObject" and the number behind "krpano_" will change every time. So that I can't set a variable (like this way: var krpano = document.getElementById("krpanoSWFObject"); ) and call its function.

zhuyuanwen avatar May 11 '17 08:05 zhuyuanwen

There could be multiple instances of Krpano viewer on a single web page so that I put some arbitrary suffix. vue-krpano is designed to take over the responsibility of creating the instance so that you no longer need to care about the DOM identity. The krpanoObj can be captured in panoCreated event. I've updated the example part in readme doc, check it out and i hope it's helpful.

chshapple avatar May 11 '17 11:05 chshapple

I’ve tried panoCreated event and got the krpanoObj. But when I want to use Javascript functions like krpano.set("view.fov", fov); krpano.get("view.fov"); , I got the error "Cannot read property 'get' of null"

zhuyuanwen avatar May 12 '17 02:05 zhuyuanwen