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.

Tuur

Erleuchteter

Beiträge: 3 839

Wohnort: Netherlands

Beruf: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Nachricht senden

21

Montag, 9. April 2018, 11:01

Hi,

i find the same in 1.19pr16

*confused*

EDIT:
i took out some 'out quoted' stuff like: /* bla bla bla */ and now it works..
Is there a bug on the quoting?

Tuur *thumbsup*

22

Montag, 9. April 2018, 14:09

ОК Tuur!!!



/*
function setfocus(){
if(arguments.length<1)return;
if(arguments[0]==='true')inputelement.focus();
else inputelement.blur();
}
*/

23

Mittwoch, 23. Mai 2018, 10:22

/*
function setfocus(){
if(arguments.length<1)return;
if(arguments[0]==='true')inputelement.focus();
else inputelement.blur();
}
i've used the other solution...

Quellcode

1
2
3
4
5
6
inputelement.addEventListener('touchstart',text_click, false);

function text_click()
{
inputelement.focus();
}

24

Dienstag, 22. September 2020, 20:17

/*
function setfocus(){
if(arguments.length<1)return;
if(arguments[0]==='true')inputelement.focus();
else inputelement.blur();
}
i've used the other solution...

Quellcode

1
2
3
4
5
6
inputelement.addEventListener('touchstart',text_click, false);

function text_click()
{
inputelement.focus();
}

/*
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 *sad*

25

Dienstag, 28. September 2021, 10:22

Hi folks,

long time no see, but still active *g*

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 *smile*
Thanks again to Klaus, for this script! Hopefully we will see a more advanced version some day *love*

Best regards,
Nupsi

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
	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);
	}
};

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Nupsi« (28. September 2021, 10:39)


26

Montag, 17. Oktober 2022, 20:24

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