Skip to content
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

Sort xviz- and custom-layers together by z-index #329

Merged
merged 2 commits into from
May 29, 2019
Merged

Sort xviz- and custom-layers together by z-index #329

merged 2 commits into from
May 29, 2019

Conversation

MGraefe
Copy link
Contributor

@MGraefe MGraefe commented May 17, 2019

Previously only xviz layers where sorted by z-index. Now it's possible
to set the property zIndex on a custom layer and have it rendered
before a xviz layer.

Previously only xviz layers where sorted by z-index. Now it's possible
to set the property zIndex on a custom layer and have it rendered
before a xviz layer.
@MGraefe
Copy link
Contributor Author

MGraefe commented May 17, 2019

NOTE: I couldn't actually test this code because I for my life cannot figure out how to integrate my custom build of streetscape.gl into my application, so it would be nice if someone could actually confirm it works as expected.

In case someone wants to help me with my build/include problem, I did the following steps:

  • Build streetscape.gl (yarn install && yarn run build)
  • Run yarn link in modules/core
  • Go to my project clean project (no node_modules)
  • Run yarn link @streetscape.gl/core && yarn install
  • Run yarn run start-live
  • I get errors in chrome console stating: Using deck.gl/core 7.0.4 and 7.0.5 simultaneously.

The package.json of my projects has the correct version for streetscape.gl specified (beta-12), I tried a lot of different things but I just cannot get it working correctly.

@twojtasz
Copy link
Contributor

@MGraefe I think you may need to link all the streetscape packages. Can you see if that works and report back.

@Pessimistress may also have other ideas.

this._getCarLayer(),
const layerList = [this._getCarLayer()];

layerList.concat(
Copy link
Contributor

Choose a reason for hiding this comment

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

layerList = layerList.concat(...)

@MGraefe
Copy link
Contributor Author

MGraefe commented May 24, 2019

I fixed the concat error. I also set the default zIndex of custom layers to 3 so custom layers are the 'last' ones by default as they where before this change. Only that it's now possible to set the property zIndex on a custom layer and have it sorted into a different place.

@Pessimistress Pessimistress merged commit b329e92 into aurora-opensource:master May 29, 2019
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