1 Star 0 Fork 0

chansigit / cellxgene_VIP

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
index_template.insert 3.39 KB
一键复制 编辑 原始数据 按行查看 历史
<script src="https://interactivereport.github.io/cellxgene_VIP/static/jquery.min.js"></script>
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://interactivereport.github.io/cellxgene_VIP/static/stackedbar/d3.v3.min.js"></script>
<link href="https://interactivereport.github.io/cellxgene_VIP/static/jspanel/dist/jspanel.css" rel="stylesheet">
<script src="https://interactivereport.github.io/cellxgene_VIP/static/jspanel/dist/jspanel.js"></script>
<script src="https://interactivereport.github.io/cellxgene_VIP/static/jspanel/dist/extensions/modal/jspanel.modal.js"></script>
<script src="https://interactivereport.github.io/cellxgene_VIP/static/jspanel/dist/extensions/tooltip/jspanel.tooltip.js"></script>
<script src="https://interactivereport.github.io/cellxgene_VIP/static/jspanel/dist/extensions/hint/jspanel.hint.js"></script>
<script src="https://interactivereport.github.io/cellxgene_VIP/static/jspanel/dist/extensions/layout/jspanel.layout.js"></script>
<script src="https://interactivereport.github.io/cellxgene_VIP/static/jspanel/dist/extensions/contextmenu/jspanel.contextmenu.js"></script>
<script src="https://interactivereport.github.io/cellxgene_VIP/static/jspanel/dist/extensions/dock/jspanel.dock.js"></script>
<script>
// execute JavaScript code in panel content
var setInnerHTML = function(elm, html) {
elm.innerHTML = html;
Array.from(elm.querySelectorAll('script')).forEach( oldScript => {
const newScript = document.createElement('script');
Array.from(oldScript.attributes)
.forEach( attr => newScript.setAttribute(attr.name, attr.value) );
newScript.appendChild(document.createTextNode(oldScript.innerHTML));
oldScript.parentNode.replaceChild(newScript, oldScript);
});
}
var plotPanel = jsPanel.create({
panelSize: '190 0',
position: 'left-top 160 6',
dragit: { containment: [-10, -2000, -4000, -2000] }, // set dragging range of VIP window
boxShadow: 1,
border: "solid #D4DBDE thin",
contentOverflow: 'scroll scroll', // adding scrolling bars
headerControls:{
close: 'remove',
minimize: 'remove',
maximize: 'remove'
},
headerTitle: function () {return '<strong>Visualization in Plugin</strong>'},
contentAjax: {
url: window.location.href.replace(/\\\/+$/,'')+'/static/interface.html',
done: function (panel) {
setInnerHTML(panel.content, this.responseText);
}
},
onwindowresize: function(event, panel) {
var jptop = parseInt(this.currentData.top);
var jpleft = parseInt(this.currentData.left);
if (jptop<-10 || window.innerHeight-jptop<10 || window.innerWidth-jpleft<10 || jpleft+parseInt(this.currentData.width)<10) {
this.reposition("left-top 160 6");
}
},
onunsmallified: function (panel, status) {
this.reposition('center-top -370 180');
this.resize({ width: 740, height: function() { return Math.min(480, window.innerHeight*0.6);} });
},
onsmallified: function (panel, status) {
this.reposition('left-top 160 6');
this.style.width = '190px';
}
}).smallify();
plotPanel.headerbar.style.background = "#D4DBDE";
</script>
1
https://gitee.com/chansigit/cellxgene_VIP.git
git@gitee.com:chansigit/cellxgene_VIP.git
chansigit
cellxgene_VIP
cellxgene_VIP
master

搜索帮助