{"id":12324,"date":"2022-06-09T15:51:18","date_gmt":"2022-06-09T06:51:18","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=12324"},"modified":"2022-06-16T11:44:24","modified_gmt":"2022-06-16T02:44:24","slug":"gwc-ui-library-grid","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=12324","title":{"rendered":"#GWC UI Library : Grid"},"content":{"rendered":"<p>\uc6f9 UI \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 GWC\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 Grid \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ub300\ud55c \uc608\uc81c \ucf54\ub4dc\uc785\ub2c8\ub2e4.<\/p>\n<p>\uba3c\uc800 DOM \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\">\r\n<div class=\"center\">\r\n    <gwc-grid id=\"grid\"><\/gwc-grid>\r\n<\/div>\r\n<\/pre>\n<p>\uadf8\ub9ac\uace0 CSS \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uad6c\uc694.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"css\">\r\n.center {\r\n    display: flex;\r\n    width: 100%;\r\n    height: 100%;\r\n    justify-content: center;\r\n    align-items: center;\r\n    gap: 1em;\r\n}\r\n\r\n#grid {\r\n    width: 500px;\r\n    height: 300px;\r\n}\r\n<\/pre>\n<p>js \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\">\r\nwindow.onload = () => {\r\n    grid.columns = [\r\n        { name: \"NO\" },\r\n        { name: \"\uc774\ub984\" },\r\n        { name: \"\ub098\uc774\" },\r\n        { name: \"\uc8fc\uc18c\" },\r\n        { name: \"\ud68c\uc0ac\" },\r\n        { name: \"\uae30\ud0c0\" }\r\n    ];\r\n\r\n    grid.data = [\r\n        { values: [\"1\", \"\uae40\uc601\ud76c\", \"30\", \"\uacbd\uae30\ub3c4 \uc591\ud3c9\uad70\", \"\ucd08\ub85d\ub9c8\uc744\", \"\uc628\ud654\ud558\uba70 \uc0b6\uc5d0 \ub300\ud55c \uc5ec\uc6b4\uc744 \ub290\ub084\uc904 \uc544\ub294 \uc0ac\ub78c\"] },\r\n        { values: [\"2\", \"\ud64d\uae38\ub3d9\", \"40\", \"\uc804\ub77c\ub0a8\ub3c4 \uc5ec\uc218\uc2dc\", \"\ud61c\ubbfc\ub2f9\", \"\uc2e4\uc874 \uc778\ubb3c\uc744 \ubaa8\ub378\ub85c\ud558\uc5ec \uc4f0\uc5ec\uc9c4 \uc18c\uc124\uc758 \uc8fc\uc778\uacf5\"] },\r\n        { values: [\"3\", \"\uc2ec\uccad\", \"15\", \"\uc81c\uc8fc\ub3c4\", \"\uc784\ub2f9\uc218\", \"\uc544\ubc84\uc9c0\uc758 \ub208\uc744 \ub0ab\uac8c\ud558\uae30 \uc704\ud574 \ud76c\uc0dd\uc744 \ud558\ub294 \uacc4\ud68d \uc788\ub294 \ud6a8\ub140\"] },\r\n        ....\r\n    ];\r\n\r\n    grid.fixFirstColumn = true;\r\n\r\n    grid.addEventListener(\"columnclick\", (event) => {\r\n        const v = grid.getColumn(event.detail.index).name;\r\n        gwcMessage(`\uceec\ub7fc\uba85: ${v}`);\r\n    });\r\n\r\n    grid.addEventListener(\"dataclick\", (event) => {\r\n        const v = grid.getData(event.detail.row, event.detail.column);\r\n        gwcMessage(`\ub370\uc774\ud130: ${v}`);\r\n    });\r\n};\r\n<\/pre>\n<p>\uc2e4\ud589 \uacb0\uacfc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<p><center><video controls=\"controls\" ><source src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2022\/06\/gwc-grid01.mp4\" \/>\ube44\ub514\uc624\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uc6f9\ube0c\ub77c\uc6b0\uc838\uc785\ub2c8\ub2e4.<\/video><\/center><\/p>\n<p>\ub2e4\uc74c\uc740 \ud06c\uae30 \uc870\uc808\uacfc \uc774\ub3d9\uc774 \uac00\ub2a5\ud55c Card \ucef4\ud3ec\ub10c\ud2b8\uc640 \ud568\uaed8 \uc0ac\uc6a9\ub41c \uc608\uc81c\uc785\ub2c8\ub2e4. <\/p>\n<p>\uba3c\uc800 DOM \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"html\">\r\n<gwc-card label=\"\uc774\ub984 \uce74\ub4dc\" gwc-draggable=\"true\">\r\n    <gwc-grid id=\"grid\"><\/gwc-grid>\r\n<\/gwc-card>\r\n<\/pre>\n<p>\uadf8\ub9ac\uace0 CSS \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uad6c\uc694.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"css\">\r\n.center {\r\n    display: flex;\r\n    width: 100%;\r\n    height: 100%;\r\n    justify-content: center;\r\n    align-items: center;\r\n    _flex-direction: column;\r\n    gap: 1em;\r\n}\r\n\r\n#grid {\r\n    width: calc(100% - 6px);\r\n    height: calc(100% - 6px);\r\n    margin: 3px;\r\n}\r\n\r\ngwc-card {\r\n    left: 100px;\r\n    top: 100px;\r\n    width: 500px;\r\n    height: 300px;\r\n}\r\n<\/pre>\n<p>js \ucf54\ub4dc\uc5d0 \ubc18\ub4dc\uc2dc \ub2e4\uc74c \ucf54\ub4dc\ub97c \ucd94\uac00\ud574 \uc918\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\">\r\nGeoServiceWebComponentManager.instance.update();\r\n<\/pre>\n<p><center><video controls=\"controls\" ><source src=\"http:\/\/www.gisdeveloper.co.kr\/wp-content\/uploads\/2022\/06\/gwc-grid2.mp4\" \/>\ube44\ub514\uc624\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uc6f9\ube0c\ub77c\uc6b0\uc838\uc785\ub2c8\ub2e4.<\/video><\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc6f9 UI \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 GWC\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 Grid \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ub300\ud55c \uc608\uc81c \ucf54\ub4dc\uc785\ub2c8\ub2e4. \uba3c\uc800 DOM \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. \uadf8\ub9ac\uace0 CSS \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uad6c\uc694. .center { display: flex; width: 100%; height: 100%; justify-content: center; align-items: center; gap: 1em; } #grid { width: 500px; height: 300px; } js \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. window.onload = () => { grid.columns = [ { &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=12324\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;#GWC UI Library : Grid&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[140],"tags":[],"class_list":["post-12324","post","type-post","status-publish","format-standard","hentry","category-gwc"],"_links":{"self":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/12324","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=12324"}],"version-history":[{"count":6,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/12324\/revisions"}],"predecessor-version":[{"id":12342,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/12324\/revisions\/12342"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12324"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12324"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12324"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}