Skip to content

Commit

Permalink
docs(Widgets): specify resources needed to use widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
mgermerie authored and gchoqueux committed Mar 17, 2022
1 parent 44cc7d0 commit b65c081
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 132 deletions.
4 changes: 2 additions & 2 deletions examples/css/widgets.css
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
width: 50%;
height: 50%;

background-image: url('../images/widget-logo.svg');
background-image: url('https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/GUI/widget-logo.svg');
background-size: 100%;
}
#widgets-navigation #zoom-out-logo {
Expand All @@ -211,7 +211,7 @@

border-radius: 50%;

background-image: url('../images/compass.svg');
background-image: url('https://raw.githubusercontent.com/iTowns/iTowns2-sample-data/master/GUI/compass.svg');
background-repeat: no-repeat;
background-size: auto 90%;
background-position: center;
Expand Down
60 changes: 0 additions & 60 deletions examples/images/compass.svg

This file was deleted.

66 changes: 0 additions & 66 deletions examples/images/widget-logo.svg

This file was deleted.

4 changes: 3 additions & 1 deletion examples/widgets_minimap.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<link rel="stylesheet" type="text/css" href="css/example.css">
<link rel="stylesheet" type="text/css" href="css/LoadingScreen.css">

<!-- Import stylesheet for itowns Widgets plugin -->
<!-- Import stylesheet for itowns Widgets plugin. This stylesheet is included in the bundles if you downloaded
them, or it can be found in `node_modules/itowns/examples/css` if you installed iTowns with npm. Otherwise, it
can be found here : https://raw.githubusercontent.com/iTowns/itowns/master/examples/css/widgets.css -->
<link rel="stylesheet" type="text/css" href="css/widgets.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.6/dat.gui.min.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion examples/widgets_navigation.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<link rel="stylesheet" type="text/css" href="css/example.css">
<link rel="stylesheet" type="text/css" href="css/LoadingScreen.css">

<!-- Import stylesheet for itowns Widgets plugin -->
<!-- Import stylesheet for itowns Widgets plugin. This stylesheet is included in the bundles if you downloaded
them, or it can be found in `node_modules/itowns/examples/css` if you installed iTowns with npm. Otherwise, it
can be found here : https://raw.githubusercontent.com/iTowns/itowns/master/examples/css/widgets.css -->
<link rel="stylesheet" type="text/css" href="css/widgets.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.6/dat.gui.min.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion examples/widgets_scale.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<link rel="stylesheet" type="text/css" href="css/example.css">
<link rel="stylesheet" type="text/css" href="css/LoadingScreen.css">

<!-- Import stylesheet for itowns Widgets plugin -->
<!-- Import stylesheet for itowns Widgets plugin. This stylesheet is included in the bundles if you downloaded
them, or it can be found in `node_modules/itowns/examples/css` if you installed iTowns with npm. Otherwise, it
can be found here : https://raw.githubusercontent.com/iTowns/itowns/master/examples/css/widgets.css -->
<link rel="stylesheet" type="text/css" href="css/widgets.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.6/dat.gui.min.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion examples/widgets_searchbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
<link rel="stylesheet" type="text/css" href="css/example.css">
<link rel="stylesheet" type="text/css" href="css/LoadingScreen.css">

<!-- Import stylesheet for itowns Widgets plugin -->
<!-- Import stylesheet for itowns Widgets plugin. This stylesheet is included in the bundles if you downloaded
them, or it can be found in `node_modules/itowns/examples/css` if you installed iTowns with npm. Otherwise, it
can be found here : https://raw.githubusercontent.com/iTowns/itowns/master/examples/css/widgets.css -->
<link rel="stylesheet" type="text/css" href="css/widgets.css">

<script src="https://cdnjs.cloudflare.com/ajax/libs/dat-gui/0.7.6/dat.gui.min.js"></script>
Expand Down
6 changes: 6 additions & 0 deletions src/Utils/gui/Minimap.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ const DEFAULT_OPTIONS = {
/**
* A widget for minimap
*
* To use it, you need to link the widgets' stylesheet to your html webpage. This stylesheet is included in
* [itowns bundles](https://github.com/iTowns/itowns/releases) if you downloaded them, or it can be found in
* `node_modules/itowns/examples/css` if you installed iTowns with npm. Otherwise, it can be found at
* [this link](https://raw.githubusercontent.com/iTowns/itowns/master/examples/css/widgets.css). See
* [this example](http://www.itowns-project.org/itowns/examples/#widgets_minimap) for more details.
*
* @extends Widget
*
* @property {HTMLElement} domElement An html div containing the minimap.
Expand Down
6 changes: 6 additions & 0 deletions src/Utils/gui/Navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ const DEFAULT_OPTIONS = {
/**
* A widget menu manager for navigation.
*
* To use it, you need to link the widgets' stylesheet to your html webpage. This stylesheet is included in
* [itowns bundles](https://github.com/iTowns/itowns/releases) if you downloaded them, or it can be found in
* `node_modules/itowns/examples/css` if you installed iTowns with npm. Otherwise, it can be found at
* [this link](https://raw.githubusercontent.com/iTowns/itowns/master/examples/css/widgets.css). See
* [this example](http://www.itowns-project.org/itowns/examples/#widgets_navigation) for more details.
*
* @extends Widget
*
* @property {HTMLElement} domElement An html div containing all navigation widgets.
Expand Down
6 changes: 6 additions & 0 deletions src/Utils/gui/Scale.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ const DEFAULT_OPTIONS = {
/**
* A widget for scale
*
* To use it, you need to link the widgets' stylesheet to your html webpage. This stylesheet is included in
* [itowns bundles](https://github.com/iTowns/itowns/releases) if you downloaded them, or it can be found in
* `node_modules/itowns/examples/css` if you installed iTowns with npm. Otherwise, it can be found at
* [this link](https://raw.githubusercontent.com/iTowns/itowns/master/examples/css/widgets.css). See
* [this example](http://www.itowns-project.org/itowns/examples/#widgets_scale) for more details.
*
* @extends Widget
*
* @property {HTMLElement} domElement An html div containing the scale.
Expand Down
6 changes: 6 additions & 0 deletions src/Utils/gui/Searchbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ function eraseSuggestionList(form) {
/**
* A widget for searchbar
*
* To use it, you need to link the widgets' stylesheet to your html webpage. This stylesheet is included in
* [itowns bundles](https://github.com/iTowns/itowns/releases) if you downloaded them, or it can be found in
* `node_modules/itowns/examples/css` if you installed iTowns with npm. Otherwise, it can be found at
* [this link](https://raw.githubusercontent.com/iTowns/itowns/master/examples/css/widgets.css). See
* [this example](http://www.itowns-project.org/itowns/examples/#widgets_searchbar) for more details.
*
* @extends Widget
*
* @property {HTMLElement} domElement An html div containing the searchbar.
Expand Down

0 comments on commit b65c081

Please sign in to comment.