/* 2020-9-24 14:48:24 | 版权所有 军懋国兴 */ var thisWidget;function initWidgetView(t){(thisWidget=t).config&&thisWidget.config.style&&$("body").addClass(thisWidget.config.style),$("#btnFlyStop").click(function(t){thisWidget.toRoamLine()}),$("#btnSelChars").click(function(t){thisWidget.showHeightChars()});var e=thisWidget.getAttr(),l=e.camera.followedX||200,a=e.camera.followedZ||50;$("#followedX").val(l),$("#followedZ").val(a),$("#cameraType").attr("data-value",e.camera.type),$("#cameraType").select(),$("#cameraType").change(function(){switch($("#tr_followedX").hide(),$("#tr_followedZ").hide(),$(this).attr("data-value")){case"dy":$("#tr_followedX").show(),$("#tr_followedZ").show(),$("#followedX").val(l),$("#followedZ").val(a);break;case"sd":$("#tr_followedZ").show(),Number($("#followedZ").val())<500&&$("#followedZ").val(500)}updateCameraSetting()}),$("#cameraType").change(),$("#followedX").change(function(){updateCameraSetting()}),$("#followedZ").change(function(){updateCameraSetting()})}function updateCameraSetting(){var t=$("#cameraType").attr("data-value"),e=Number($("#followedX").val()),l=Number($("#followedZ").val());thisWidget.updateStyle({camera:{type:t,followedX:e,followedZ:l}})}var _alltime=100;function showAllInfo(t){_alltime=t.alltime,$("#td_name").html(t.name),$("#td_alltimes").html(haoutil.str.formatTime(t.alltime)),$("#td_alllength").html(haoutil.str.formatLength(t.alllen))}function showRealTimeInfo(t){var e=Math.ceil(100*t.time/_alltime);e<1&&(e=1),100'),e.push('
'+l.find(":selected").text()+"
"),e.push('"),e.push("");var t=o(e.join("")),a=t.find("."+d.select_text),i=t.find("."+d.select_ul);l.after(t),l.hide(),l.change(function(){var e=l.attr("data-value");l.children("option").each(function(){var t=o(this);e==t.val()&&a.text(t.text())})}),t.click(function(t){o(this).toggleClass("mp_selected"),o(this).find("."+d.select_ul).slideToggle().end().siblings("div."+d.select).find("."+d.select_ul).slideUp(),t.stopPropagation()}),o("body").click(function(){i.slideUp()}),i.on("click","li",function(){var t=o(this),e=t.addClass("selecton").siblings("li").removeClass("selecton").end().data("value").toString();e!==l.attr("data-value")&&(a.text(t.text()),l.attr("data-value",e),l.change())})})}})}(jQuery);