{"id":12065,"date":"2022-02-20T21:01:40","date_gmt":"2022-02-20T12:01:40","guid":{"rendered":"http:\/\/www.gisdeveloper.co.kr\/?p=12065"},"modified":"2022-07-07T13:41:07","modified_gmt":"2022-07-07T04:41:07","slug":"gwc-ui-library-gwcinput-%ed%95%a8%ec%88%98","status":"publish","type":"post","link":"http:\/\/www.gisdeveloper.co.kr\/?p=12065","title":{"rendered":"#GWC UI Library : gwcInput \ud568\uc218"},"content":{"rendered":"<p>\uc6f9 UI \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 GWC\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 gwcInput \ud568\uc218\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-button id=\"button\" title=\"gwcInput \ud568\uc218\"><\/gwc-button>\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: 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    button.onclick = event => { \r\n        gwcInput({\r\n            message: \"\ud3f4\ub354 \uc774\ub984\uc744 \uc785\ub825\ud558\uc138\uc694\",\r\n            value: \"\uc774\ub984\", \/\/ optional\r\n            onOkay: (value) => { \/\/ \ud655\uc778 \ubc84\ud2bc \ucc98\ub9ac\r\n                console.log(value);\r\n                if(value.trim().length === 0) {\r\n                    gwcMessage(\"\uac12\uc744 \uc785\ub825\ud558\uc138\uc694.\", true);\r\n                    return false; \/\/ false\ub97c \ubc18\ud658\ud558\uba74 \uc785\ub825\ucc3d\uc774 \ub2eb\ud788\uc9c0 \uc54a\uc74c\r\n                } else {\r\n                    gwcMessage(`\uc785\ub825\ud55c \uac12\uc740 <span style=\"color:yellow\">${value}<\/span> \uc785\ub2c8\ub2e4.`);\r\n                }\r\n            },\r\n            onCancel: (value) => { \/\/ \ucde8\uc18c \ubc84\ud2bc \ucc98\ub9ac\r\n                \/\/ false\ub97c \ubc18\ud658\ud558\uba74 \uc785\ub825\ucc3d\uc774 \ub2eb\ud788\uc9c0 \uc54a\uc74c\r\n                \/\/return false; \r\n            }\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\/02\/gwc-input.mp4\" \/>\ube44\ub514\uc624\ub97c \uc9c0\uc6d0\ud558\uc9c0 \uc54a\ub294 \uc6f9\ube0c\ub77c\uc6b0\uc838\uc785\ub2c8\ub2e4.<\/video><\/center><\/p>\n<p>gwcInput \ud568\uc218\ub294 \ud45c\uc2dc\ub418\ub294 \ub300\ud654\uc0c1\uc790\uc5d0 \ub300\ud55c \uac1d\uccb4\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4. \uc774 \uac1d\uccb4\uac00 dlg\ub77c\uace0 \ud560\ub54c \ub0b4\ubd80\uc5d0 \ud45c\uc2dc\ub418\ub294 \uba54\uc138\uc9c0\ub97c 1\ucd08\ub9c8\ub2e4 \ubcc0\uacbd\ud558\ub2e4\uac00 \uc218\ucd08 \uacbd\uacfc \ud6c4 \uc790\ub3d9\uc73c\ub85c \ub2eb\ud788\uac8c \ud558\ub294 \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\">\r\nlet i = 0;\r\nsetInterval(() => {\r\n    i++;\r\n    dlg.message = i;\r\n\r\n    if(i === 4) dlg.remove();\r\n}, 1000);\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uc6f9 UI \ub77c\uc774\ube0c\ub7ec\ub9ac\uc778 GWC\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 gwcInput \ud568\uc218\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: 3em; } js \ucf54\ub4dc\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4. window.onload = () => { button.onclick = event => { gwcInput({ message: &#8220;\ud3f4\ub354 \uc774\ub984\uc744 \uc785\ub825\ud558\uc138\uc694&#8221;, value: &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/www.gisdeveloper.co.kr\/?p=12065\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;#GWC UI Library : gwcInput \ud568\uc218&#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-12065","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\/12065","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=12065"}],"version-history":[{"count":4,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/12065\/revisions"}],"predecessor-version":[{"id":12371,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=\/wp\/v2\/posts\/12065\/revisions\/12371"}],"wp:attachment":[{"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=12065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=12065"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gisdeveloper.co.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=12065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}