YKPN#64569 ShowRoom popupje kan nu ook in 3D via &showmode=3
svn path=/Website/trunk/; revision=57290
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
vKey ALG_VERDIEPING.ALG_VERDIEPING_KEY
|
||||
ins_key Een ins_deel. Ruimte wordt er bij gezocht
|
||||
res_ruimte_key Een reserveerbare ruimte. Ruimte(s) worden er bij gezocht
|
||||
showmode 2=2D, 3=3D
|
||||
Context:
|
||||
Note: Als rKey niet is gegeven moet vKey gedefieerd zijn
|
||||
anders wordt hij er wel bij gezocht.
|
||||
@@ -29,12 +30,15 @@ FCLTHeader.Requires({ js: ["jquery.js"] });
|
||||
var caddwgy = getQParamFloat("caddwgy", null); // y co<63>rdinaat van een specifieke plek in de ruimte die gehighlight moet worden.
|
||||
var mld_key_dwgxy = getQParamInt("mld_key_dwgxy", -1); // Melding van de meegegeven co<63>rdinaten x en y.
|
||||
|
||||
var showmode = getQParamInt("showmode", 2); // 2=only2d, 3=only3d TODO: toggle?
|
||||
|
||||
if (ins_key > 0)
|
||||
{
|
||||
oRs = Oracle.Execute("SELECT ins_discipline_key" +
|
||||
" FROM ins_deel" +
|
||||
" WHERE ins_deel_key = " + ins_key);
|
||||
discArray.push(oRs("ins_discipline_key").Value); // zou dubbel kunnen zijn
|
||||
oRs.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -70,6 +74,7 @@ FCLTHeader.Requires({ js: ["jquery.js"] });
|
||||
Response.End;
|
||||
}
|
||||
vKey = oRs("alg_verdieping_key").Value;
|
||||
oRs.Close();
|
||||
}
|
||||
else if (rrkey > 0) // reserveerbare ruimte
|
||||
{
|
||||
@@ -87,6 +92,7 @@ FCLTHeader.Requires({ js: ["jquery.js"] });
|
||||
prKeys.push(oRs("alg_ruimte_key").Value);
|
||||
oRs.MoveNext();
|
||||
}
|
||||
oRs.Close();
|
||||
prKey = prKeys.join(",");
|
||||
}
|
||||
else // vkey verplicht
|
||||
@@ -99,13 +105,16 @@ FCLTHeader.Requires({ js: ["jquery.js"] });
|
||||
" WHERE alg_verdieping_key = " + vKey);
|
||||
var titel = L("lcl_graphics") + " " + oRs("alg_locatie_code").Value + "-"
|
||||
+ oRs("alg_gebouw_upper").Value + "-"
|
||||
+ oRs("alg_verdieping_omschrijving").Value
|
||||
+ oRs("alg_verdieping_omschrijving").Value;
|
||||
oRs.Close();
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<% FCLTHeader.Generate() %>
|
||||
|
||||
<script type="text/javascript">
|
||||
<script>
|
||||
var showmode = <%=showmode%>;
|
||||
|
||||
function resizeIframes()
|
||||
{
|
||||
var height = parseInt(document.documentElement.clientHeight);
|
||||
@@ -142,17 +151,42 @@ FCLTHeader.Requires({ js: ["jquery.js"] });
|
||||
|
||||
function init()
|
||||
{
|
||||
MMap.Reset();
|
||||
MMap.SetIMGGenerator("../CAD/mySlnk2IMG.asp");
|
||||
MMap.SetCustomParameters(params)
|
||||
MMap.SetLabelPosition(<%=S("fg_labelPosition")%>);
|
||||
MMap.SetPaperColor(<%=S("fg_paperColor")%>);
|
||||
MMap.Refresh(true); // Try to zoom extents
|
||||
if (showmode == 2) // 2D
|
||||
{
|
||||
MMap.Reset();
|
||||
MMap.SetIMGGenerator("../CAD/mySlnk2IMG.asp");
|
||||
MMap.SetCustomParameters(params)
|
||||
MMap.SetLabelPosition(<%=S("fg_labelPosition")%>);
|
||||
MMap.SetPaperColor(<%=S("fg_paperColor")%>);
|
||||
MMap.Refresh(true); // Try to zoom extents
|
||||
}
|
||||
else // 3D
|
||||
{
|
||||
MMap.SetCustomParameters(params);
|
||||
// Eerst een keer het plaatje heel globaal renderen om dwg-info te achterhalen
|
||||
$.getJSON("../CAD/mySlnk2IMG.asp?AsMap=1&vKey=<%=vKey%>", { }, function (pSLNKEvent)
|
||||
{
|
||||
MMap.gSLNKEvent = pSLNKEvent;
|
||||
var zoomDWGX = (pSLNKEvent.DWGminX + pSLNKEvent.DWGmaxX) / 2;
|
||||
var zoomDWGY = (pSLNKEvent.DWGminY + pSLNKEvent.DWGmaxY) / 2;
|
||||
var zoomScale = Math.min(window.innerWidth / (pSLNKEvent.DWGmaxX - pSLNKEvent.DWGminX),
|
||||
window.innerHeight / (pSLNKEvent.DWGmaxY - pSLNKEvent.DWGminY));
|
||||
MMap.zoom2DWG(zoomDWGX, zoomDWGY, zoomScale * 2); // TODO waarom is hij zonder de '* 2' te klein?
|
||||
MMap.Refresh(); // Try not to zoom extents
|
||||
} );
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<title><%=safe.html(titel)%></title>
|
||||
</head>
|
||||
|
||||
<%
|
||||
if (showmode == 2)
|
||||
var mapper = "../SlnkDWF/ToonIMG.asp";
|
||||
else
|
||||
var mapper = "3dize.asp";
|
||||
%>
|
||||
|
||||
<body class='modal' id='docBody' onLoad='javascript:init();'>
|
||||
<!-- ==========================
|
||||
HET plaatje
|
||||
@@ -163,7 +197,7 @@ FCLTHeader.Requires({ js: ["jquery.js"] });
|
||||
id="MinMaxBtn"
|
||||
title="<%=L("lcl_cad_maximize")%>"
|
||||
style="display:none"><%=I("fa-external-link fa-lg")%></span>
|
||||
<iframe id="MMap" name="MMap" src="../SlnkDWF/ToonIMG.asp"
|
||||
<iframe id="MMap" name="MMap" src="<%=mapper%>"
|
||||
frameborder="0" framespacing="0" scrolling="no"
|
||||
style="width: 100%; height:100%">
|
||||
</iframe>
|
||||
|
||||
Reference in New Issue
Block a user