Skip to content

Commit

Permalink
Automated package and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ronzim committed May 25, 2021
1 parent a71c5f1 commit 1c03ed2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 5,870 deletions.
2,901 changes: 1 addition & 2,900 deletions dist/diglettk.js

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions docs/documentation/MPRManager.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h4 class="name" id="MPRManager"><span class="type-signature"></span>new MPRMana

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line34">line 34</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line32">line 32</a>
</li></ul></dd>


Expand Down Expand Up @@ -313,7 +313,7 @@ <h4 class="name" id="wwwl"><span class="type-signature"></span>wwwl<span class="

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line66">line 66</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line61">line 61</a>
</li></ul></dd>


Expand Down Expand Up @@ -396,7 +396,7 @@ <h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span c

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line520">line 520</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line471">line 471</a>
</li></ul></dd>


Expand Down Expand Up @@ -483,7 +483,7 @@ <h4 class="name" id="getInitialState"><span class="type-signature"></span>getIni

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line101">line 101</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line96">line 96</a>
</li></ul></dd>


Expand Down Expand Up @@ -592,7 +592,7 @@ <h4 class="name" id="onRotate"><span class="type-signature"></span>onRotate<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line420">line 420</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line370">line 370</a>
</li></ul></dd>


Expand Down Expand Up @@ -797,7 +797,7 @@ <h4 class="name" id="onThickness"><span class="type-signature"></span>onThicknes

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line455">line 455</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line405">line 405</a>
</li></ul></dd>


Expand Down Expand Up @@ -1002,7 +1002,7 @@ <h4 class="name" id="resize"><span class="type-signature"></span>resize<span cla

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line507">line 507</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line457">line 457</a>
</li></ul></dd>


Expand Down Expand Up @@ -1138,7 +1138,7 @@ <h4 class="name" id="setImage"><span class="type-signature"></span>setImage<span

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line144">line 144</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line139">line 139</a>
</li></ul></dd>


Expand Down Expand Up @@ -1297,7 +1297,7 @@ <h4 class="name" id="setTool"><span class="type-signature"></span>setTool<span c

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line176">line 176</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line171">line 171</a>
</li></ul></dd>


Expand Down
2 changes: 1 addition & 1 deletion docs/documentation/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ <h4 class="name" id="State">State</h4>

<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line18">line 18</a>
<a href="mprManager.js.html">mprManager.js</a>, <a href="mprManager.js.html#line16">line 16</a>
</li></ul></dd>


Expand Down
69 changes: 10 additions & 59 deletions docs/documentation/mprManager.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ <h1 class="page-title">mprManager.js</h1>

import { MPRView } from "./mprView";

window.istyle = {};

/**
* Internal state of a single view
* @typedef {Object} State
Expand Down Expand Up @@ -106,9 +104,6 @@ <h1 class="page-title">mprManager.js</h1>
this.mprViews = {};

this.initMPR();

// FOR DEV
window.mpr = this;
}

/**
Expand Down Expand Up @@ -255,12 +250,11 @@ <h1 class="page-title">mprManager.js</h1>
istyle.setOnScroll(() => {
this.onScrolled(state);
});
// TODO update something if needed
// istyle.setOnPanChanged(levels => {
// this.updateLevels({ ...levels, srcKey: key }, state);
// });
// update interactor center
istyle.setOnPanChanged(() => {
this.updateInteractorCenters(state);
});
this.mprViews[key].setInteractor(istyle);
window.istyle[key] = istyle;
});
this._activeTool = "pan";
}
Expand All @@ -278,58 +272,15 @@ <h1 class="page-title">mprManager.js</h1>
istyle.setOnScroll(() => {
this.onScrolled(state);
});
// TODO update something if needed
// istyle.setOnZoomChanged(levels => {
// this.updateLevels({ ...levels, srcKey: key }, state);
// });
// update interactor center
istyle.setOnZoomChanged(() => {
this.updateInteractorCenters(state);
});
this.mprViews[key].setInteractor(istyle);
window.istyle[key] = istyle;
});
this._activeTool = "zoom";
}

/**
* Set "pan" as active tool
* @private
* @param {State} state - The current manager state
*/
// setPanTool(state) {
// Object.entries(state.views).forEach(([key]) => {
// const istyle = vtkInteractorStyleManipulator.newInstance();
// const panManipulator = vtkMouseCameraTrackballPanManipulator.newInstance({
// button: 1
// // control: true
// });
// istyle.addMouseManipulator(panManipulator);
// this.mprViews[key]._renderWindow
// .getInteractor()
// .setInteractorStyle(istyle);
// });
// this._activeTool = "pan";
// }

/**
* Set "zoom" as active tool
* @private
* @param {State} state - The current manager state
*/
// setZoomTool(state) {
// Object.entries(state.views).forEach(([key]) => {
// const istyle = vtkInteractorStyleManipulator.newInstance();
// const zoomManipulator = vtkMouseCameraTrackballZoomManipulator.newInstance(
// {
// button: 1
// // scrollEnabled: true
// }
// );
// istyle.addMouseManipulator(zoomManipulator);
// this.mprViews[key]._renderWindow
// .getInteractor()
// .setInteractorStyle(istyle);
// });
// this._activeTool = "zoom";
// }

/**
* Set "level" as active tool
* @private
Expand All @@ -345,7 +296,6 @@ <h1 class="page-title">mprManager.js</h1>
this.updateLevels({ ...levels, srcKey: key }, state);
});
this.mprViews[key].setInteractor(istyle);
window.istyle[key] = istyle;
});
this._activeTool = "level";
}
Expand Down Expand Up @@ -556,14 +506,15 @@ <h1 class="page-title">mprManager.js</h1>
* Force views resize
* @param {String} key - If provided, resize just its view, otherwise all views
*/
resize(key) {
resize(state, key) {
if (key) {
this.mprViews[key].onResize();
} else {
Object.values(this.mprViews).forEach(view => {
view.onResize();
});
}
this.updateInteractorCenters(state);
}

/**
Expand Down
1 change: 0 additions & 1 deletion docs/documentation/mprView.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ <h1 class="page-title">mprView.js</h1>
const oldStyle = renderWindow.getInteractor().getInteractorStyle();

renderWindow.getInteractor().setInteractorStyle(istyle);
// NOTE: react-vtk-viewport's code put this here, so we're copying it. Seems redundant?
istyle.setInteractor(renderWindow.getInteractor());

// Make sure to set the style to the interactor itself, because reasons...?!
Expand Down
Loading

0 comments on commit 1c03ed2

Please sign in to comment.