{"id":11844,"date":"2022-01-08T07:25:23","date_gmt":"2022-01-07T22:25:23","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=11844"},"modified":"2022-09-05T08:58:14","modified_gmt":"2022-09-04T23:58:14","slug":"gwc-ui-library-checkbox","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=11844","title":{"rendered":"#GWC UI Library : CheckBox"},"content":{"rendered":"<p>\uc6f9 UI \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 GWC\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 CheckBox \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-label id=\"label\" content=\"CheckBox \uc0c1\ud0dc \uc774\ubca4\ud2b8 \uc815\ubcf4\" outline-type=\"concave\"><\/gwc-label>\r\n    <div>\r\n        <gwc-checkbox id=\"checkbox1\" label=\"\uc778\uac04\uc740\" checked=true tooltip=\"\ud234\ud301\uc73c\ub85c \ud45c\uc2dc\ub420 \ubb38\uc790\uc5f4\"><\/gwc-checkbox>\r\n        <gwc-checkbox id=\"checkbox2\" label=\"\ub9d0\uc774 \uc544\ub2cc\" disabled=\"true\"><\/gwc-checkbox>\r\n        <gwc-checkbox id=\"checkbox3\" label=\"\ud589\uc704\ub85c\"><\/gwc-checkbox>\r\n        <gwc-checkbox id=\"checkbox4\" label=\"\uc815\uc758\ub41c\ub2e4.\"><\/gwc-checkbox>\r\n    <\/div>\r\n    <gwc-button id=\"button\" title=\"\uc0c1\ud0dc \ud655\uc778\" \/>\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    flex-direction: column;\r\n    gap: 3em;\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    const onChange = (event) => {\r\n        const checkbox = event.target;\r\n        label.content = `\r\n            <span style=\"color:yellow\">${checkbox.id}<\/span> \uc0c1\ud0dc\uac00 \r\n            <span style=\"color:yellow\">${checkbox.checked}<\/span>\ub85c \ubcc0\uacbd\ub418\uc5c8\uc2b5\ub2c8\ub2e4.`;\r\n    };\r\n\r\n    checkbox1.addEventListener(\"change\", onChange);\r\n    checkbox2.addEventListener(\"change\", onChange);\r\n    checkbox3.addEventListener(\"change\", onChange);\r\n    checkbox4.addEventListener(\"change\", onChange);\r\n\r\n    button.addEventListener(\"click\", () => {\r\n        const bChecked1 = checkbox1.checked;\r\n        const bChecked2 = checkbox2.checked;\r\n        const bChecked3 = checkbox3.checked;\r\n        const bChecked4 = checkbox4.checked;\r\n\r\n        const txtChecked = \"<span style='color:YELLOW'>CHECK<\/span>\";\r\n        const txtNotChecked = \"<span style='color:GRAY'>NOT CHECK<\/span>\";\r\n\r\n        gwcMessage(`\r\n            checkbox1: ${bChecked1?txtChecked:txtNotChecked}<br>\r\n            checkbox2: ${bChecked2?txtChecked:txtNotChecked}<br>\r\n            checkbox3: ${bChecked3?txtChecked:txtNotChecked}<br>\r\n            checkbox4: ${bChecked4?txtChecked:txtNotChecked}\r\n        `);\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\/01\/gwc-component-checkbox.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 CheckBox \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; flex-direction: column; gap: 3em; } js \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. window.onload = () => { const onChange = (event) => { const checkbox = &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=11844\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;#GWC UI Library : CheckBox&#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-11844","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\/11844","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=11844"}],"version-history":[{"count":6,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/11844\/revisions"}],"predecessor-version":[{"id":12704,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/11844\/revisions\/12704"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=11844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=11844"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=11844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}