Skip to content

Official multi viewport API - Implement per RFC (Stage 2 of 3) - #1380

Merged
ibgreen merged 2 commits into
ib/view-class-add-nonbreaking-filesfrom
ib/view-class-add-props
Feb 9, 2018
Merged

ibgreen merged 2 commits into
ib/view-class-add-nonbreaking-filesfrom
ib/view-class-add-props

Conversation

@ibgreen

@ibgreen ibgreen commented Feb 3, 2018

Copy link
Copy Markdown
Collaborator

Implements #1370

This is a staged diff (shows differences compared to #1379)

@ibgreen
ibgreen force-pushed the ib/view-class-add-props branch from a6e4cbe to c860a3c Compare February 3, 2018 18:48
@ibgreen ibgreen changed the title Implement official multi viewport API per RFC Implement official multi viewport API per RFC (Stage 2 of 3) Feb 3, 2018
@ibgreen ibgreen changed the title Implement official multi viewport API per RFC (Stage 2 of 3) Official multi viewport API - Implement per RFC (Stage 2 of 3) Feb 3, 2018
this._activateViewport(viewport);
// }
this.context.viewports = newViewports;
this._activateViewport(viewport);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Doesn't this trigger layer updates? Then called again in drawLayers?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, this is an area that has needed improvement since we introduced multi-viewport.

The reason it is here is that there is an issue when no viewport is selected in the layers during an update.

I don't think it is a regression. Updated #1370 to make sure we address after this lands.


// TODO/xiaoji: This should be merged with the controller's prop constraint system
export function extractViewportFrom(props) {
export function extractViewState(props) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is WebMercatorViewport specific. Should this util be offered by the Viewport/View class?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes good idea. This diff just renames the function to reduce View/Viewport/ViewState confusion.

Updated #1370 to make sure we address after this lands.

@ibgreen
ibgreen merged commit f3ac070 into ib/view-class-add-nonbreaking-files Feb 9, 2018
@ibgreen
ibgreen deleted the ib/view-class-add-props branch February 9, 2018 15:28
ibgreen added a commit that referenced this pull request Feb 9, 2018
* Implement official multi view API

* Update examples for official multi viewport API (#1381)
ibgreen added a commit that referenced this pull request Feb 9, 2018
* View classes and docs

* Official multi viewport API - Implement per RFC (Stage 2 of 3) (#1380)

* Update examples for official multi viewport API (Stage 3 of 3) (#1381)
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.

2 participants