Skip to content

Commit

Permalink
examples(js): move plugins to a specific folder
Browse files Browse the repository at this point in the history
  • Loading branch information
zarov committed Aug 1, 2019
1 parent f370f44 commit 5459c9d
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 12 deletions.
6 changes: 4 additions & 2 deletions docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@
],

"Plugins": [
"DragNDrop"
"DragNDrop",
"FeatureToolTip",
"TIFFParser"
]
}
},
Expand All @@ -106,7 +108,7 @@
}
},
"source": {
"include": [ "src", "examples/js" ],
"include": [ "src", "examples/js/plugins" ],
"exclude": [ "src/ThreeExtended" ]
},
"plugins": ["plugins/markdown"]
Expand Down
2 changes: 1 addition & 1 deletion examples/drag-n-drop.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
href="http://www.itowns-project.org/itowns/docs/#api/Plugins/DragNDrop"
target="_blank">in the documentation.</a></p></div>
</div>
<script src="js/DragNDrop.js"></script>
<script src="js/plugins/DragNDrop.js"></script>
<script src="../dist/itowns.js"></script>
<script src="js/GUI/LoadingScreen.js"></script>
<script type="text/javascript">
Expand Down
4 changes: 2 additions & 2 deletions examples/globe_vector.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script src="js/GUI/GuiTools.js"></script>
<script src="../dist/itowns.js"></script>
<script src="js/GUI/LoadingScreen.js"></script>
<script src="js/FeatureToolTip.js"></script>
<script src="js/plugins/FeatureToolTip.js"></script>
<script type="text/javascript">
// # Simple Globe viewer
/* global itowns, setupLoadingScreen, GuiTools, ToolTip */
Expand Down Expand Up @@ -132,7 +132,7 @@

// Listen for globe full initialisation event
view.addEventListener(itowns.VIEW_EVENTS.LAYERS_INITIALIZED, function _() {
Promise.all(promises).then(new ToolTip(view));
Promise.all(promises).then(new FeatureToolTip(view));
});
</script>
</body>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@
* @param {boolean} [options.filterAll=true] - Filter all the properties.
* Default to true.
*
* @class FeatureToolTip
*
* @example
* view.addEventListener(itowns.VIEW_EVENTS.LAYERS_INITIALIZED, function() {
* new ToolTip(view);
* new FeatureToolTip(view);
* });
*/
function ToolTip(viewer, options) {
function FeatureToolTip(viewer, options) {
var opts = options || { filterAll: true };
opts.filter = opts.filter == undefined ? [] : opts.filter;

Expand Down Expand Up @@ -145,5 +147,5 @@ function ToolTip(viewer, options) {
}

if (typeof module != 'undefined' && module.exports) {
module.exports = ToolTip;
module.exports = FeatureToolTip;
}
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/shapefile.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<script src="js/GUI/GuiTools.js"></script>
<script src="../dist/itowns.js"></script>
<script src="js/GUI/LoadingScreen.js"></script>
<script src="js/FeatureToolTip.js"></script>
<script src="js/plugins/FeatureToolTip.js"></script>
<script src="../dist/debug.js"></script>
<script type="text/javascript">
// Define initial camera position
Expand Down Expand Up @@ -61,7 +61,7 @@

view.addLayer(velibLayer);

new ToolTip(view, { filterAll: false });
new FeatureToolTip(view, { filterAll: false });
});
</script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion examples/tiff.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<script src="../dist/itowns.js"></script>
<script src="../dist/debug.js"></script>
<script src="js/GUI/LoadingScreen.js"></script>
<script src="js/TIFFParser.js"></script>
<script src="js/plugins/TIFFParser.js"></script>
<script type="text/javascript">
// # Simple Globe viewer

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<link rel="stylesheet" type="text/css" href="examples/css/example.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="examples/js/GUI/dat.gui/dat.gui.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.6/dat.gui.min.js"></script>
</head>
<body>
<div id="viewerDiv" class="viewer"></div>
Expand Down

0 comments on commit 5459c9d

Please sign in to comment.