JavaScript Rendering Library¶
We provide a JavaScript library intended to ease the development of applications by providing wrappers for faster and easier graphics rendering on Visionect client devices. Koalalib library can be downloaded from GitHub (https://github.com/visionect/koalalib).
To get control over rendering you need to:
- Add the library to your document.
<script src="jquery.js"></script>
<script src="okular.js"></script>
- Call .tmList(); function on elements which you want to push to screen.
//JavaScript code
//I want to push a popup screen (implemented as a "div" element with class .popup) to render after I touch a button.
function showPopup(text){
$(".popup").text(text).show().tmList();
}
function closePopup(){
$(".popup").text("").tmList().hide();
}
$(".button").click(function(){
showPopup("Popup is shown");
});
$(".popup").click(function(){
hidePopup("Popup is shown");
});
More documentation is available on GitHub. The use of this library is strongly advised, as it prevents the typical errors with direct access to Visionect JavaScript Extensions.