Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

feat: draggable layer #58

Merged
merged 57 commits into from
Oct 20, 2021
Merged

feat: draggable layer #58

merged 57 commits into from
Oct 20, 2021

Conversation

HideBa
Copy link
Member

@HideBa HideBa commented Aug 4, 2021

Overview

  • Allowed users to change layer's location property by drag and drop

What I've done

  • Dev cesium-dnd package
  • added it on Re:Earth
  • When the visualizer is initialized, instantiate cesium-dnd
  • When layers position have been changed, call mutation

What I haven't done

  • On the design, when a user is dragging the layer the mouse's lat lng should be displayed, but I haven't

How I tested

  • I've tested that I can change layers position by drag and drop
    • sphere
    • photo-overlay
    • marker
  • I've checked that property value is also updated
  • I've tested that if I change the linked layer, the location value is overwritten.
  • I've tested that the child layer's position is also updated

Screenshot

68689e1f3a66649abb1d7e58692aa3ce

14ca1499a8de2c830df3f4fa85669b3c

Which point do I want you to review particularly

  • If I don't break the responsibility of visualizer, engine, etc.
  • Any tips to improve the performance of dnd
  • ScreenSpaceCameraController.enableRotate should be kept after DnD by cesium-dnd, but it's locked. I deliberately enable to rotate when the layer is dropped. If you have any idea to improve it.
  • The logic to convert raw layer data to handy data doesn't follow DRY principle. I'll refactor that part. If you have any suggestions, give me.

Memo

@HideBa HideBa self-assigned this Aug 4, 2021
@netlify
Copy link

netlify bot commented Aug 4, 2021

✔️ Deploy Preview for reearth-web ready!

🔨 Explore the source changes: c364e4b

🔍 Inspect the deploy log: https://app.netlify.com/sites/reearth-web/deploys/616f9c97586e7000083f95a3

😎 Browse the preview: https://deploy-preview-58--reearth-web.netlify.app

@HideBa HideBa changed the base branch from main to refactor/visualizer August 5, 2021 22:22
@HideBa HideBa marked this pull request as ready for review August 5, 2021 22:26
@lavalse
Copy link
Member

lavalse commented Sep 10, 2021

For me, I still feel the performance is not good enough after changing the maker's location, and the fps just come to less than 20 every time I rotate the earth. If we should test on a better back-end environment, just merge to main, see what will happen.
Thanks

lavalse
lavalse previously approved these changes Oct 20, 2021
Copy link
Member

@lavalse lavalse left a comment

Choose a reason for hiding this comment

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

looks nice, hope to merge as soon as possible

…r different property keys, delete console.log
rot1024
rot1024 previously approved these changes Oct 20, 2021
@HideBa HideBa merged commit 25a2171 into main Oct 20, 2021
@HideBa HideBa deleted the feat/change-layer-pos branch October 20, 2021 05:46
keiya01 pushed a commit that referenced this pull request Apr 25, 2023
* feat: tag system domain models (#39)

* feat: tag system domain models

* refactor: * add tag interface * tag -> group and tag->item conversation

* testing: generate test cases for the tagID

* resolve notes

* fix unit tests errors

* add NewId test code
fix NewId func

* add more test cases
refactor some parts

* feat: tag system data-layer (mongo) (#44)

* feat: tag system data-layer (mongo)

* remove len > 0 check

* goimport

* Update pkg/tag/group_builder.go

Co-authored-by: rot1024 <[email protected]>

* Update pkg/tag/item_builder.go

Co-authored-by: rot1024 <[email protected]>

* rename itemFrom and groupFrom funcs

Co-authored-by: rot1024 <[email protected]>

* feat: create tag group and tag item (#45)

* tag item and group schema

* feat: creat tags (GQL schema)

* tag items and tag groups resolvers

* datalayer (dummy memory) and usecases

* receive list by reference

* check if nil for list

* resolve notes

* generate new models

* feat: memory infrastructure (#46)

* refactor: implement memory infrastructure

* test: implement memory infrastructure test cases

* test: fix FindByScene test case

* feat: attach/detach tag from layer (#50)

* tag item and group schema

* feat: creat tags (GQL schema)

* tag items and tag groups resolvers

* datalayer (dummy memory) and usecases

* receive list by reference

* check if nil for list

* feat: introduce tags to layers

* feat: attach/detach tags from layers

* fix imports

* refactor: resolve notes

* test: test units for tags

* refactor: resolve notes

* feat: attach/detach tag item from group (#52)

* refactor: transform group tags list to reference

* feat: attach/detach tags

* refactor: use params as use-case input

* test: mongodoc testing (#61)

* test: mongodoc testing

* resolve notes

* feat: remove tag (#58)

* feat: remove a tag (init)

* feat: remove tag

* feat: remove tag usecase and infra

* resolve notes

* feat: tag system queries (#54)

* feat: tag system queries

* resolve notes

* feat: update tag (#49)

* tag item and group schema

* feat: creat tags (GQL schema)

* tag items and tag groups resolvers

* datalayer (dummy memory) and usecases

* receive list by reference

* check if nil for list

* feat: rename tag group

* refactor: rename -> update

* resolve notes

* resolve notes

* change find by id func return type

* Merge branch 'tag-system' of https://github.com/reearth/reearth-backend into tag/update-group-label

# Conflicts:
#	internal/adapter/gql/generated.go
#	internal/adapter/gql/gqlmodel/convert_tag.go

* fix testing

* resolve notes

* resolve notes

* resolve notes

Co-authored-by: HideBa <[email protected]>
Co-authored-by: rot1024 <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants