Docs: Difference between revisions
Appearance
No edit summary |
Function codes |
||
Line 358: | Line 358: | ||
| | | | ||
| | | | ||
| | |<syntaxhighlight lang="javascript" line="1" start="11"> | ||
function init_dom() { | |||
owot = document.getElementById("owot"); | |||
owot.style.display = "block"; | |||
owot.style.cursor = defaultCursor; | |||
owotCtx = owot.getContext("2d"); | |||
textInput = document.getElementById("textInput"); | |||
textInput.value = ""; | |||
linkElm = elm.link_element; | |||
linkDiv = elm.link_div; | |||
updateCoordDisplay(); | |||
initTextDecoBar(); | |||
defineElements({ | |||
owot: owot, | |||
textInput: textInput | |||
}); | |||
} | |||
</syntaxhighlight> | |||
|- | |- | ||
|getWndWidth() | |getWndWidth() | ||
| | | | ||
| | | | ||
|<syntaxhighlight lang="javascript" line="1"> | |<syntaxhighlight lang="javascript" line="1" start="27"> | ||
function getWndWidth() { | |||
return document.body.clientWidth || window.innerWidth; | |||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|- | |- |