-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move some ngeo elements to modules #3257
Conversation
38e6b4c
to
7ca9152
Compare
The nego layertree work well, but the test of the layertree not. |
examples/desktopgeolocation.html
Outdated
@@ -33,7 +33,7 @@ | |||
ngeo-desktop-geolocation-options="::ctrl.desktopGeolocationOptions"> | |||
</button> | |||
<p id="desc"> | |||
This example shows how to use the <code><a href="../apidoc/ngeo.desktopGeolocationDirective.html" title="Read our documentation">ngeo-desktop-geolocation</a></code> | |||
This example shows how to use the <code><a href="../apidoc/ngeo..geolocation.desktop.html" title="Read our documentation">ngeo-desktop-geolocation</a></code> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra .
.
7ca9152
to
449a8be
Compare
It works :-) |
5143329
to
700fda5
Compare
3033632
to
3e1b33b
Compare
65148e5
to
f583a31
Compare
f583a31
to
e164c62
Compare
Not all is perfect, but at least, it passes this time. Anyway, files with unclean things will move in the future |
src/directives/drawfeature.js
Outdated
goog.require('ol.Feature'); | ||
|
||
/** @suppress {extraRequire} */ | ||
goog.require('ngeo.measure.module'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is not good. Directive code should not require a toplevel module.
Only applications and examples require top level modules. Invidivual Angular files must require the fine grained dependency they actually need.
This principle is necessary to avoid bloat. We can discuss if you think there are cases when it does not make sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No you're right.
(Except eventually for some GMF directive that will be moved soon. But that's not the case here.)
|
||
|
||
/** @type {!angular.Module} **/ | ||
app.module = angular.module('app', [ | ||
ngeo.module.name, | ||
ngeo.map.module.name, | ||
ngeo.ToolActivateMgr.module.name, | ||
ngeo.googlestreetview.module.name, | ||
ngeo.ToolActivateMgr.module.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For information, it is now possible to have dangling comas. It helps get cleaner diffs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've learned this during this PR. Thanks
:-) |
Create ngeo top-level modules:
I don't want to move more module at once. I'll open others PR to move the others modules