-
-
Notifications
You must be signed in to change notification settings - Fork 111
[examples] Added UI guidance to JSONDataUpdate override example #494
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
Changes from all commits
df25ab3
9319f23
f502b36
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,48 @@ | |
| <!-- theme can be easily customized via css --> | ||
| <link href="../lib/css/netjsongraph-theme.css" rel="stylesheet" /> | ||
| <link href="../lib/css/netjsongraph.css" rel="stylesheet" /> | ||
| <style> | ||
| html, | ||
| body { | ||
| width: 100%; | ||
| height: 100%; | ||
| margin: 0; | ||
| padding: 0; | ||
| } | ||
| #map-container { | ||
| position: absolute; | ||
| top: 0; | ||
| left: 0; | ||
| width: 100%; | ||
| height: 100%; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div | ||
| id="info-banner" | ||
| style=" | ||
| position: fixed; | ||
| top: 10px; | ||
| left: 50%; | ||
| transform: translateX(-50%); | ||
| background: rgba(52, 73, 94, 0.95); | ||
| color: white; | ||
| padding: 12px 20px; | ||
| border-radius: 8px; | ||
| font-size: 14px; | ||
| z-index: 1000; | ||
| max-width: 90%; | ||
| text-align: center; | ||
| box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be good to move all the CSS logic to one file so it can be shared between different examples which need further explanation.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we extract this to a dedicated CSS so we can reuse it across different examples. Can you also add a close button? |
||
| " | ||
| > | ||
| <strong>JSONDataUpdate - Override Mode:</strong> This example demonstrates | ||
| replacing existing map data with new data based on zoom level. <br /><em | ||
| >Try zooming in to levels 4 and 6 to see the data being replaced.</em | ||
| > | ||
| </div> | ||
| <div id="map-container"></div> | ||
| <script type="text/javascript"> | ||
| /* | ||
| The demo is used to show how to use the `JSONDataUpdate` function to update data. | ||
|
|
@@ -29,6 +69,7 @@ | |
| 6: "3.json", | ||
| }, | ||
| map = new NetJSONGraph("../assets/data/netjsonNodeTiles/1.json", { | ||
| el: "#map-container", | ||
| render: "map", | ||
| // set map initial state. | ||
| mapOptions: { | ||
|
|
||
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.
These changes are being handled in #497.