mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 00:26:10 +03:00
code cleanup
This commit is contained in:
parent
f510301922
commit
f4ded1630f
@ -262,7 +262,7 @@ $.extend( $.World.prototype, $.EventSource.prototype, /** @lends OpenSeadragon.W
|
|||||||
this.viewer.drawer.draw(this._items);
|
this.viewer.drawer.draw(this._items);
|
||||||
this._needsDraw = false;
|
this._needsDraw = false;
|
||||||
this._items.forEach(function(item){
|
this._items.forEach(function(item){
|
||||||
this._needsDraw = item.setDrawn() || this._needsDraw || true;
|
this._needsDraw = item.setDrawn() || this._needsDraw;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
<link rel="stylesheet" href="../lib/jquery-ui-1.10.2/css/smoothness/jquery-ui-1.10.2.min.css">
|
<link rel="stylesheet" href="../lib/jquery-ui-1.10.2/css/smoothness/jquery-ui-1.10.2.min.css">
|
||||||
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/stats.js/17/Stats.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script> -->
|
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/stats.js/17/Stats.js" crossorigin="anonymous" referrerpolicy="no-referrer"></script> -->
|
||||||
|
|
||||||
<!-- <script type="text/javascript" src="./webgldemodrawer.js"></script> -->
|
<script type="text/javascript" src="./webgldemodrawer.js"></script>
|
||||||
<script type="module" src="./drawerperformance.js"></script>
|
<script type="module" src="./drawerperformance.js"></script>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.content{
|
.content{
|
||||||
|
@ -53,7 +53,7 @@ $('#create-drawer').on('click',function(){
|
|||||||
window.setInterval(()=>{
|
window.setInterval(()=>{
|
||||||
let m = movingLeft ? 1 : -1;
|
let m = movingLeft ? 1 : -1;
|
||||||
movingLeft = m === -1;
|
movingLeft = m === -1;
|
||||||
let dist = viewer.viewport.getBounds().width / 2 / viewer.viewport.getZoom();
|
let dist = viewer.viewport.getBounds().width;
|
||||||
viewer.viewport.panBy(new OpenSeadragon.Point( dist * m/2, 0));
|
viewer.viewport.panBy(new OpenSeadragon.Point( dist * m/2, 0));
|
||||||
|
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
Loading…
Reference in New Issue
Block a user