Title: Nested grid looses verticalMargin setting when parent grid item moved (inherits parent setting) · Issue #726 · gridstack/gridstack.js · GitHub
Open Graph Title: Nested grid looses verticalMargin setting when parent grid item moved (inherits parent setting) · Issue #726 · gridstack/gridstack.js
X Title: Nested grid looses verticalMargin setting when parent grid item moved (inherits parent setting) · Issue #726 · gridstack/gridstack.js
Description: I have a nested grid with its own verticalMargin setting, which differs to the parent (wrapper) grid. Moving a parent grid widget results in the nested grid being redrawn with the parent margin setting not its own. Movie showing this is ...
Open Graph Description: I have a nested grid with its own verticalMargin setting, which differs to the parent (wrapper) grid. Moving a parent grid widget results in the nested grid being redrawn with the parent margin set...
X Description: I have a nested grid with its own verticalMargin setting, which differs to the parent (wrapper) grid. Moving a parent grid widget results in the nested grid being redrawn with the parent margin set...
Opengraph URL: https://github.com/gridstack/gridstack.js/issues/726
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Nested grid looses verticalMargin setting when parent grid item moved (inherits parent setting)","articleBody":"I have a nested grid with its own verticalMargin setting, which differs to the parent (wrapper) grid.\r\n\r\nMoving a parent grid widget results in the nested grid being redrawn with the parent margin setting not its own.\r\n\r\nMovie showing this is attached.\r\n[nestedloosemargin.zip](https://github.com/troolee/gridstack.js/files/1172241/nestedloosemargin.zip)\r\n\r\nMy grid code:\r\n```\r\n\u003c!--WRAPPER-->\u003cdiv class=\"myGrid\" style=\"background: #2c3e50;\">\r\n\u003cdiv class=\"grid-stack grid-stack-8\" data-gs-animate=\"yes\">\u003c!--START GRID-->\r\n\u003cdiv class=\"grid-stack-item\" data-gs-x=\"0\" data-gs-y=\"0\" data-gs-width=\"3\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr1\">1\u003cbr/>\u003cp>Shoot me an email.\u003c/p>\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-stack-item\" data-gs-x=\"3\" data-gs-y=\"0\" data-gs-width=\"2\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr2\">2\u003cbr>\u003cstrong>hello\u003c/strong>\u003cp>This is a no-brainer.\u003c/p>\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-stack-item\" data-gs-x=\"5\" data-gs-y=\"0\" data-gs-width=\"3\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr3\">3\u003cbr>hello\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-stack-item\" data-gs-x=\"0\" data-gs-y=\"3\" data-gs-width=\"2\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr2\">4\u003cbr>world\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-stack-item\" data-gs-x=\"2\" data-gs-y=\"3\" data-gs-width=\"4\" data-gs-height=\"6\">\u003cdiv class=\"grid-stack-item-content clr3\">\u003c!-- HERE-->\u003cdiv class=\"grid-inner grid-stack-2\" data-gs-animate=\"yes\">\u003c!--START INNER GRID-->\r\n\u003cdiv class=\"grid-inner-item grid-stack-item\" data-gs-x=\"0\" data-gs-y=\"0\" data-gs-width=\"1\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr7\">Inner1\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-inner-item grid-stack-item\" data-gs-x=\"1\" data-gs-y=\"0\" data-gs-width=\"1\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr6\">Inner2\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-inner-item grid-stack-item\" data-gs-x=\"0\" data-gs-y=\"3\" data-gs-width=\"1\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr6\">Inner3\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-inner-item grid-stack-item\" data-gs-x=\"1\" data-gs-y=\"3\" data-gs-width=\"1\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr7\">Inner4\u003c/div>\u003c/div>\r\n\u003c!-- END INNER GRID -->\u003c/div>\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-stack-item\" data-gs-x=\"6\" data-gs-y=\"3\" data-gs-width=\"2\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr9\">5\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-stack-item\" data-gs-x=\"0\" data-gs-y=\"6\" data-gs-width=\"2\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr0\">6\u003c/div>\u003c/div>\r\n\u003cdiv class=\"grid-stack-item\" data-gs-x=\"6\" data-gs-y=\"6\" data-gs-width=\"2\" data-gs-height=\"3\">\u003cdiv class=\"grid-stack-item-content clr8\">7\u003c/div>\u003c/div>\u003c!-- END GRID -->\u003c/div>\r\n\u003c!--end wrapper-->\u003c/div>\r\n```\r\nMy function and options:\r\n```\r\n $(function () {\r\n var options = {\r\n width: 8,\r\n verticalMargin: 3,\r\n cellHeight:'3.5em',\r\n resizable: {\r\n handles: 'e, se, s, sw, w'\r\n }\r\n };\r\n $('.grid-stack').gridstack(options);\r\n\r\nvar nestedoptions = {\r\n width:2,\r\n verticalMargin: 0,\r\n cellHeight:'3.5em',\r\n resizable: {\r\n handles: 'e, se, s, sw, w'\r\n }\r\n };\r\n $('.grid-inner').gridstack(nestedoptions);\r\n });\r\n```","author":{"url":"https://github.com/kool-kat","@type":"Person","name":"kool-kat"},"datePublished":"2017-07-25T06:59:47Z","url":"https://github.com/gridstack/gridstack.js/issues/726"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d28028a9-0667-89fe-f3e6-2c25ded29bce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 825A:13925:541FF2:54C339:6AFF59DC |
| html-safe-nonce | cdb51a40fe2a02c5aea9c33d5a889178c60e5f6f442d98557fcb08628ccce2f9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjVBOjEzOTI1OjU0MUZGMjo1NEMzMzk6NkFGRjU5REMiLCJ2aXNpdG9yX2lkIjoiNDYzMDY1NjQ3NDE1NzExMTc3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1ad78fbd8777604d05c137664b5555f2c2932c72ae38a576f770d4326ee965e9 |
| hovercard-subject-tag | issue:245303695 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/gridstack/gridstack.js/726/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e1c033e36d6e005a96bb90522bf153a4d0fc03682ae66dc425321f13f5bf1b27/gridstack/gridstack.js/issues/726 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e1c033e36d6e005a96bb90522bf153a4d0fc03682ae66dc425321f13f5bf1b27/gridstack/gridstack.js/issues/726 |
| og:image:alt | I have a nested grid with its own verticalMargin setting, which differs to the parent (wrapper) grid. Moving a parent grid widget results in the nested grid being redrawn with the parent margin set... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kool-kat |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2422ccd4bc783f932948cce4871cb9e0622bab749db07f387c9631b7e6834d1f |
| turbo-cache-control | no-preview |
| go-import | github.com/gridstack/gridstack.js git https://github.com/gridstack/gridstack.js.git |
| octolytics-dimension-user_id | 31674162 |
| octolytics-dimension-user_login | gridstack |
| octolytics-dimension-repository_id | 26417283 |
| octolytics-dimension-repository_nwo | gridstack/gridstack.js |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 26417283 |
| octolytics-dimension-repository_network_root_nwo | gridstack/gridstack.js |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2a39546baeb98186e651a01d5d7aa6465825eeb1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width