mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 10:46:53 +00:00
svg.js: fix clicking on the plot for plotEmbed=0 (Forum #89460)
git-svn-id: https://svn.fhem.de/fhem/trunk@17006 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
34bbe23ba6
commit
93ec54436c
@ -448,7 +448,7 @@ f18_compEl(el)
|
|||||||
function
|
function
|
||||||
f18_addDragger(el)
|
f18_addDragger(el)
|
||||||
{
|
{
|
||||||
if(f18_small)
|
if(f18_small || FW_urlParams.detail)
|
||||||
return;
|
return;
|
||||||
if($(el).find(".dragger").length)
|
if($(el).find(".dragger").length)
|
||||||
return;
|
return;
|
||||||
@ -597,7 +597,7 @@ f18_convertToAbs()
|
|||||||
function
|
function
|
||||||
f18_setPos(el)
|
f18_setPos(el)
|
||||||
{
|
{
|
||||||
if(f18_small)
|
if(f18_small || FW_urlParams.detail)
|
||||||
return;
|
return;
|
||||||
var comp = f18_compEl(el);
|
var comp = f18_compEl(el);
|
||||||
if($(comp).length == 0)
|
if($(comp).length == 0)
|
||||||
|
@ -65,14 +65,13 @@ svg_click(evt)
|
|||||||
var t = evt.target;
|
var t = evt.target;
|
||||||
var o = svg_prepareHash(t);
|
var o = svg_prepareHash(t);
|
||||||
|
|
||||||
var y_org = (((o.y_h-evt.clientY)/o.y_mul)+o.y_min).toFixed(o.decimals);
|
var y_org = (((o.y_h-evt.offsetY)/o.y_mul)+o.y_min).toFixed(o.decimals);
|
||||||
var d = new Date((((evt.clientX-o.x_min)/o.t_mul)+o.x_off) * 1000);
|
var d = new Date((((evt.clientX-o.x_min)/o.t_mul)+o.x_off) * 1000);
|
||||||
var ts = (d.getHours() < 10 ? '0' : '') + d.getHours() + ":"+
|
var ts = (d.getHours() < 10 ? '0' : '') + d.getHours() + ":"+
|
||||||
(d.getMinutes() < 10 ? '0' : '') + d.getMinutes();
|
(d.getMinutes() < 10 ? '0' : '') + d.getMinutes();
|
||||||
|
|
||||||
|
var tl = $(t).closest("svg").find("#svg_title");
|
||||||
var tl = t.ownerDocument.getElementById('svg_title');
|
$(tl).html($(t).attr("title")+": "+y_org+" ("+ts+")");
|
||||||
tl.firstChild.nodeValue = t.getAttribute("title")+": "+y_org+" ("+ts+")";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function
|
function
|
||||||
|
Loading…
x
Reference in New Issue
Block a user