OBJ
๊ฐ ์ด๋ํจ์ ๋ฐ๋ผ Event
๋ฅผ ๋ฐ์์ํฌ ์ ์์ต๋๋ค.
์ข ๋ฅ | Template์์ฑ | Event Data | ์ค๋ช |
---|---|---|---|
start | data-event-start | {box, obj, boxSize} | box๊ฐ ์์ฑ๋ ๋ |
boxin | data-event-boxin | {boxel, obj, copyObj, boxSize, boxBefore, data} | OBJ๊ฐ ํด๋น BOX๋ก ๋ค์ด์ฌ๋ |
boxout | data-event-boxout | {boxel, obj, copyObj, boxSize, boxBefore, data} | OBJ๊ฐ ํด๋น BOX์์ ๋๊ฐ๋ |
boxinout | data-event-boxinout | {boxel, obj, copyObj, boxSize, boxBefore, data} | OBJ๊ฐ ํด๋น BOX๋ก ๋ค์ด์ค๊ฑฐ๋ ๋๊ฐ๋ |
beforeboxin | data-event-beforeboxin | {box, obj, boxSize} | OBJ๊ฐ ํด๋น BOX๋ก ๋ค์ด์ค๊ธฐ ์ ์ |
mustdo | data-event-mustdo | null | ๋ฌด์กฐ๊ฑด ๋ฐ์. |
external | data-event-external | Event | Browser ์ธ๋ถ๋ก๋ถํฐ ํ์ผ์ ๋๊ณ ์์๋ |
afterdetect | data-event-afterdetect | null | ํ์ง(detect)๋ฅผ ๋ง์น ํ |
swappedin | data-event-swappedin | {boxel, obj, boxBefore} | swap์ด ๋ฐ์ํ ๋ |
swappedout | data-event-swappedout | {boxel, obj, boxBefore} | swap์ด ๋ฐ์ํ ๋ |
ํธ์๋ฅผ ์ํด์ ์์ ์์๋ ๋ค์ ์ฝ๋๊ฐ ์๋ต๋์ด ์์ต๋๋ค.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sj-js/boxman/dist/css/boxman.min.css">
<script src="https://cdn.jsdelivr.net/npm/@sj-js/crossman/dist/js/crossman.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@sj-js/boxman/dist/js/boxman.min.js"></script>
<script>
var boxman = new BoxMan().setTheme('test-1');
</script>
BOX๊ฐ ์์ฑ๋ ๋ ๋ฐ์ํฉ๋๋ค.
OBJ๊ฐ ํด๋น BOX์ ๋ค์ด์ค๊ธฐ ์ ์