hoverboard-firmware-hack-fo.../01_Matlab/BLDC_controller_ert_rtw/html/webview/support/lib/webview/main-embedded-webview.js

8 lines
1.7 KiB
JavaScript

/*
Copyright 2016-2017 The MathWorks, Inc.
*/
require("dojo/_base/kernel dojo/topic webview/parser webview/interface webview/utils/hash dojo/ready webview/widgets/App".split(" "),function(q,f,m,a,n,p){p(function(){function h(b){var g=this.targetNode,d=g.dataset,c;if(d.slwebviewElemAnchor||d.slwebviewElemLink)c=d.slwebviewElemAnchor||d.slwebviewElemLink,a.disableModelToDoc(c),a.open(c,{type:"element",nohash:!0}).then(function(){a.highlightAndFade(c,{nohash:!0}).then(function(){a.enableModelToDoc(c)},function(){a.enableModelToDoc(c)})},function(){a.enableModelToDoc(d.slwebviewElemAnchor)});
else if(d.slwebviewDiagAnchor||d.slwebviewDiagLink)c=d.slwebviewDiagAnchor||d.slwebviewDiagLink,a.disableModelToDoc(c),a.open(c,{type:"diagram",nohash:!0}).then(function(){a.enableModelToDoc(c)},function(){a.enableModelToDoc(c)});g.scrollIntoView();g.classList.remove("slwebview-anchor-highlight");top.slwebview.__tmp=g.offsetWidth;g.classList.add("slwebview-anchor-highlight");b.nohash||(e=!0,n(this.tocId));b.preventDefault&&b.preventDefault()}var k=0,l={},e=!1;f.subscribe("/dojo/hashchange",function(b){if(b=
l[b])e||h.call(b,{nohash:!0}),e=!1});toc.onLinkCreate=function(b,a){b.targetNode=a;b.tocId="toc:"+String(k+=1);b.addEventListener("click",h,!1);l[b.tocId]=b};top.slwebview=a;f.subscribe("/webview/ready",function(b){a.enableModelToDoc(b.id)});(function(){var b=document.querySelectorAll("div#toc, toc");if(b){var a=document.body;toc.HTMLOutline(a);if(a.sectionList)for(var d=0;d<b.length;++d){var c=b[d],e=6,f=c.getAttribute("number-of-levels");f&&(e=Number(f));c.appendChild(toc.createOutline(a.sectionList,
e,1))}}})();a.addElementLinkListeners();a.addDiagramLinkListeners();m.parse()})});