Skip to content

Simple overview container #288

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

Merged
merged 3 commits into from
Nov 4, 2014
Merged

Simple overview container #288

merged 3 commits into from
Nov 4, 2014

Conversation

bentrm
Copy link
Member

@bentrm bentrm commented Oct 8, 2014

This is a rather simple container to add an overview control to an application. I wanted to see if it's worth the effort to add tests and docs?

@marcjansen
Copy link
Member

Hey @bentrm, I like it, please go ahead if you want to. May I suggest to add a panel to the example with description and also to embed an overview in a layout managed by Ext?

Maybe something like this?

overview

It looks great already!

@chrismayer
Copy link
Contributor

Thank you @bentrm for providing this. Looks really great so far. To be honest I am sure that there are several project solutions for overview map panels out there but none has found the way to the lib. So double thanks for this!

Some little remark: is there a reason why you destroy and re-create the control when size updates?

@marcjansen
Copy link
Member

@bentrm, are you still working on this? Shall we provide more help? Just tell us what you think is missing to get this further.

@bentrm
Copy link
Member Author

bentrm commented Oct 28, 2014

@marcjansen: Sorry, I didn't have time at hand. I will try to update on this at the end of this week. It shouldn't take to long anyway.

@chrismayer: There is no viable way of updating the dimension of the overview control that I know of. Updating the size of the encapsulated map won't work so people tend to suggest to re-create the control altogether. If I'm overlooking something obvious I'm happy for some input.

@bentrm
Copy link
Member Author

bentrm commented Nov 2, 2014

I made some additions and changes. Please let me know what can be improved.

<!DOCTYPE html>
<html>
<head>
<title>Hello GeoExt2</title>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change to sth. more specific.

@marcjansen
Copy link
Member

Hey @bentrm; we're nearly there... good work so far. Please address my comments and this is good to go. Thanks.

I just see that @chrismayer has also added comments, please have a look at them as well.

* Reference to the OpenLayers.Control.OverviewMap control.
*
* @private {OpenLayers.Control.OverviewMap}
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can mark this as a non-private readonly property by adding
@property @readonly

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'd let @bentrm decide this, we're not to strict with this elsewhere anyway.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess it helps browsing the docs, so I'll do just that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bentrm
Copy link
Member Author

bentrm commented Nov 3, 2014

Thanks for your feedback, I hope I didn't overlook something.
JSDuck doesn't have a @public tag so I had to remove it all together to make compiling the docs possible.

@marcjansen
Copy link
Member

Some final remarks:

  • I'd prefer using split: true instead of a dedicated resizable option (It also feels better for me that only the left border can be used to change the width):
diff --git a/examples/overview/overview-generic.js b/examples/overview/overview-generic.js
index 1b1794c..c09d0f9 100644
--- a/examples/overview/overview-generic.js
+++ b/examples/overview/overview-generic.js
@@ -43,10 +43,7 @@ Ext.application({
                         align: 'stretch'
                     },
                     width: 300,
-                    resizable: {
-                        widthIncrement: 10,
-                        handlers: 'w'
-                    },
+                    split: true,
                     items: [
                         {
                             title: 'Description',
diff --git a/examples/overview/overview.js b/examples/overview/overview.js
index 4a39b22..ac563f7 100644
--- a/examples/overview/overview.js
+++ b/examples/overview/overview.js
@@ -97,10 +97,7 @@ Ext.application({
                         align: 'stretch'
                     },
                     width: 300,
-                    resizable: {
-                        widthIncrement: 10,
-                        handlers: 'w'
-                    },
+                    split: true,
                     items: [
                         {
                             title: 'Description',

This looks great to me.

@bentrm
Copy link
Member Author

bentrm commented Nov 3, 2014

There you go. I'm not sure if Travis catches up after a rebase? Edit: It does. Pretty nice.
Thanks for suggesting the split option, that looks much cleaner.

@marcjansen
Copy link
Member

Great, I am going to merge this now. Thanks for your patience and continued work on this. I am sure this will render many project solutions useless 😉

marcjansen added a commit that referenced this pull request Nov 4, 2014
Simple overview container
@marcjansen marcjansen merged commit ffb5510 into geoext:master Nov 4, 2014
@chrismayer
Copy link
Contributor

Yeah, thanks a lot @bentrm ! This is a nice feature. Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants