<html>
|
<head>
|
<meta http-equiv="X-UA-Compatible" content="IE=9" />
|
<title>3D View Comparison</title>
|
<script type="text/javascript" src="range.js"></script>
|
<script type="text/javascript" src="timer.js"></script>
|
<script type="text/javascript" src="slider.js"></script>
|
<script language="javascript" src="../ToolsCommon65.js"></script>
|
<link type="text/css" rel="StyleSheet" href="slider.css" />
|
|
<link type="text/css" rel="StyleSheet" href="../Style.css" />
|
<style>
|
.directionSelect
|
{width: 80px; color:White; background-color:#535353; border: 2px double white;}
|
</style>
|
|
<object id="SGWorld" classid="CLSID:3a4f9197-65a8-11d5-85c1-0001023952c1">
|
</object>
|
<script language="jscript" type="text/javascript">
|
|
var snapshotAImg;
|
var snapshotBImg;
|
var sliderClip;
|
var lastlevelClip = 0;
|
var lastleveltran = 0;
|
var ImageryLayerObj;
|
var ImageryLayerGeometry;
|
var ClipAutoOnOff = false;
|
var Cliptimeout;
|
|
//--------------
|
// Init
|
function Init() {
|
|
try {
|
|
snapshotAImg = decodeURI(GetParamValue("A", ""));
|
snapshotAImg = snapshotAImg.replace("#", ".");
|
|
if (snapshotAImg == "")
|
{
|
alert (SGLang.i18n("Text3") );
|
return;
|
}
|
|
CaptureB();
|
|
document.getElementById("SnapshotA").src = snapshotAImg;
|
document.getElementById("SnapshotB").src = snapshotBImg;
|
|
sliderClip = new Slider(document.getElementById("sliderClip"), document.getElementById("sliderClipID"));
|
sliderClip.setValue(100);
|
sliderClip.setMinimum(0);
|
sliderClip.setMaximum(100);
|
sliderClip.onchange = function () {
|
SetClipTrans(sliderClip.getValue());
|
};
|
|
|
}
|
catch (e) { alert(SGLang.i18n("Text13") + e.message); }
|
|
document.getElementById("mainTblID").style.visibility = "visible";
|
SGWorld.Window.RemovePopupByCaption(SGLang.i18n("Text6"));
|
|
}
|
|
|
//--------------
|
// CaptureB
|
function CaptureB() {
|
try {
|
var ratio = SGWorld.Window.Rect.Width / SGWorld.Window.Rect.Height;
|
var width = Math.min(SGWorld.Window.Rect.Width, 1499);
|
var height = Math.min(width / ratio, 1499);
|
snapshotBImg = SGWorld.Window.GetSnapShot(true, width, height, "JPeg75", 0);
|
}
|
catch (err) {alert (err);}
|
|
}
|
|
//--------------
|
// SetTransparency
|
function SetTransparency(level) {
|
try {
|
var imgB = document.getElementById("SnapshotB").style;
|
imgB.opacity = (level / 100.0);
|
imgB.MozOpacity = (level / 100.0);
|
imgB.KhtmlOpacity = (level / 100.0);
|
imgB.filter = 'alpha(opacity=' + level + ')';
|
|
// document.getElementById("SnapshotA").style.filters.alpha.opacity = level ;
|
// filter: alpha(opacity = 40);
|
|
|
// ImageryLayerObj.FillStyle.Color.SetAlpha(level / 100.0);
|
document.getElementById("clipSpan").innerHTML = level + "%";
|
}
|
catch (e) { alert(SGLang.i18n("Text3") + e.message); }
|
}
|
|
//--------------
|
// SetClip
|
function SetClip(level) {
|
|
var imgB = document.getElementById("SnapshotB");
|
var divB = document.getElementById("snapshotBDiv").style;
|
|
divB.left = 5 + "px";
|
divB.top = 40 + "px";
|
divB.height = imgB.clientHeight + "px";
|
divB.width = imgB.clientWidth + "px";
|
imgB.style.marginLeft = 0;
|
imgB.style.marginTop = 0;
|
|
if (document.getElementById("clipDirectionID").value == "0") {
|
divB.width = imgB.clientWidth * level / 100.0 + "px";
|
}
|
if (document.getElementById("clipDirectionID").value == "1") {
|
divB.width = imgB.clientWidth * level / 100.0 + "px";
|
var offset = imgB.clientWidth - imgB.clientWidth * level / 100.0;
|
divB.left = offset + 5 + "px";
|
imgB.style.marginLeft = -offset + "px";
|
}
|
if (document.getElementById("clipDirectionID").value == "2") {
|
divB.height = imgB.clientHeight * level / 100.0 + "px";
|
var offset = imgB.clientHeight - imgB.clientHeight * level / 100.0;
|
divB.top = offset + 40 + "px";
|
imgB.style.marginTop = -offset + "px";
|
}
|
if (document.getElementById("clipDirectionID").value == "3") {
|
divB.height = Math.max(1, imgB.clientHeight * level / 100.0) + "px";
|
}
|
|
document.getElementById("clipSpan").innerHTML = level + "%";
|
|
}
|
|
//--------------
|
// SetClipTrans
|
function SetClipTrans(level) {
|
|
if (document.getElementById("clipDirectionID").value == "4") { // Transparency
|
SetClip(100);
|
SetTransparency(level);
|
return;
|
}
|
else { // Clipping
|
SetTransparency(100);
|
SetClip(level);
|
}
|
}
|
//--------------
|
// DynamicCompare
|
function DynamicCompare() {
|
|
|
var url = abspath() + "/ImageComparisonPopup.html";
|
var popupMsg = SGWorld.Creator.CreatePopupMessage(SGLang.i18n("Text15"), url, 0, 5, 480, 120, -1);
|
|
popupMsg.Flags = 2 + 64 + 128 + 2048;
|
SGWorld.Window.ShowPopup(popupMsg);
|
|
exitTool();
|
}
|
|
|
//--------------
|
// exitTool
|
function exitTool() {
|
SGWorld.Window.RemovePopupByCaption(SGLang.i18n("Text31"));
|
SGWorld.Window.RemovePopupByCaption(SGLang.i18n("Text16"));
|
}
|
|
</script>
|
|
</head>
|
<body onload="Init();" onunload="exitTool();" style="overflow:hidden; border: 0;background-color: #535353" leftmargin='2' topmargin="5" marginwidth="0" marginheight="0" > <!-- oncontextmenu="return false;">-->
|
<table id="mainTblID" cellpadding ="0" cellspacing = "1" border="0" style="visibility:_hidden;" >
|
|
<tr style="color:White">
|
<td style="width:120px;color:White" ><span class="i18n" >Text22</span>
|
<select class="directionSelect" style="vertical-align:middle" id="clipDirectionID" onchange="SetClipTrans(sliderClip.getValue());">
|
<option value="0" class="i18n">Text23</option>
|
<option value="1" class="i18n">Text24</option>
|
<option value="2" class="i18n">Text25</option>
|
<option value="3" class="i18n">Text26</option>
|
<option value="4" class="i18n">Text21</option>
|
</select>
|
</td>
|
<td style="width:270px" ><span id="sliderClip" style="display:inline-block"><input type="text" id="sliderClipID" /></span> <span id="clipSpan" style="color:White">100%</span></td>
|
<!-- <td style="color:White; text-decoration:underline;"><span class="i18n" onclick="DynamicCompare();" style="cursor:pointer;">Text30</span></td>-->
|
</tr>
|
<tr>
|
<td colspan="4">
|
<div id="snapshotADiv" style="position:absolute; left:5px; top:40px; overflow:hidden"><img id="SnapshotA" src="" alt="snapshot A" /></div>
|
<div id="snapshotBDiv" style="position:absolute; left:5px; top:40px; overflow:hidden"><img id="SnapshotB" src="" alt="snapshot B" /></div>
|
</td>
|
</tr>
|
</table>
|
|
|
</body>
|
</html>
|
|
|
<!--Sig:00000040Bxo14MswWmd5#dbo.9e0QpzNiuSShkjDTXx9GFOLkGlsk9p4rbijxY4XW.4uE7H3nAG8ilW9jOb95FJ4aZWUGDJJ-->
|