Hi,
i find the same in 1.19pr16
EDIT:
i took out some 'out quoted' stuff like: /* bla bla bla */ and now it works..
Is there a bug on the quoting?
Tuur
Hi,
i find the same in 1.19pr16
EDIT:
i took out some 'out quoted' stuff like: /* bla bla bla */ and now it works..
Is there a bug on the quoting?
Tuur
ОК Tuur!!!
/*
function setfocus(){
if(arguments.length<1)return;
if(arguments[0]==='true')inputelement.focus();
else inputelement.blur();
}
*/
/*
function setfocus(){
if(arguments.length<1)return;
if(arguments[0]==='true')inputelement.focus();
else inputelement.blur();
}
i've used the other solution...
/*
krpano - super simple html5 text input plugin
*/
var krpanoplugin = function()
{
var local = this;
var krpano = null;
var plugin = null;
var inputelement = null;
local.registerplugin = function(krpanointerface, pluginpath, pluginobject)
{
krpano = krpanointerface;
plugin = pluginobject;
inputelement = document.createElement("input");
inputelement.type = "text";
inputelement.style.width = "100%";
inputelement.style.height = "100%";
inputelement.style.color = "#535349";
inputelement.style.fontFamily = "Verdana";
inputelement.style.fontSize = "12px";
plugin.registerattribute("text", "", text_set, text_get);
plugin.registerattribute("onchanged", null);
inputelement.addEventListener("change", text_changed, true);
inputelement.addEventListener('touchstart',text_click, false);
plugin.sprite.appendChild(inputelement);
}
local.unloadplugin = function()
{
plugin = null;
krpano = null;
}
function text_set(newtext)
{
inputelement.value = newtext;
}
function text_get()
{
return inputelement.value;
}
function text_changed()
{
krpano.call(plugin.onchanged, plugin);
}
function text_click()
{
inputelement.focus();
}
};
this is code is not working((( focus is not set
Hi folks,
long time no see, but still active
The focus-problem drove me nuts, so here is my solution, which also works on Androids without holding the finger for 2 seconds on the screen.
Woks just fine for me, so hopefully for you too
Thanks again to Klaus, for this script! Hopefully we will see a more advanced version some day
Best regards,
Nupsi
/*
krpano - super simple html5 text input plugin
*/
var krpanoplugin = function()
{
var local = this;
var krpano = null;
var plugin = null;
var inputelement = null;
local.registerplugin = function(krpanointerface, pluginpath, pluginobject)
{
krpano = krpanointerface;
plugin = pluginobject;
inputelement = document.createElement("input");
inputelement.type = "text";
inputelement.style.width = "100%";
inputelement.style.height = "100%";
plugin.registerattribute("text", "", text_set, text_get);
plugin.registerattribute("onchanged", null);
inputelement.addEventListener("change", text_changed, true);
inputelement.addEventListener("touchstart",text_click, true);
inputelement.addEventListener("blur", e => {e.target.focus();});
plugin.sprite.appendChild(inputelement);
}
local.unloadplugin = function()
{
plugin = null;
krpano = null;
}
function text_click()
{
inputelement.focus();
}
function text_set(newtext)
{
inputelement.value = newtext;
}
function text_get()
{
return inputelement.value;
}
function text_changed()
{
krpano.call(plugin.onchanged, plugin);
}
};
Display More
Hi, I'd like to use three or more textinput boxes and place them like hotspots.I'd like to use them for example like passwords for opening doors = go to another pano.
Any idea?
Thank you
Don’t have an account yet? Register yourself now and be a part of our community!