I'm trying to embed SmartClient into an existing html framework. In my html page, I have the following:
$(document).ready(function() {
isc.Canvas.create({
ID: "scContent",
autoDraw:true,
backgroundColor:"red",
width: "100%",
matchElement: true,
htmlElement: "mainContent"
});
}
however, as the documentation says, when the page is resized, my Smartclient content is not resized since matchElement=true.
Why is that?
I can work around this with following code I found in ISC_Core.js which seems simple:
window.addEventListener("resize", function(){
scContent.setWidth(isc.Element.getNativeInnerWidth(scContent.htmlElement));
scContent.setHeight(isc.Element.getNativeInnerHeight(scContent.htmlElement));
});
and with another some other event handlers, and this doesn't appear to be slow in my browser (or at least it won't annoy users nearly as much as objects which don't resize).
Why doesn't Smartclient just do this automatically? Is there some individual event SC could listen to (or which I could listen to)?
$(document).ready(function() {
isc.Canvas.create({
ID: "scContent",
autoDraw:true,
backgroundColor:"red",
width: "100%",
matchElement: true,
htmlElement: "mainContent"
});
}
however, as the documentation says, when the page is resized, my Smartclient content is not resized since matchElement=true.
Why is that?
I can work around this with following code I found in ISC_Core.js which seems simple:
window.addEventListener("resize", function(){
scContent.setWidth(isc.Element.getNativeInnerWidth(scContent.htmlElement));
scContent.setHeight(isc.Element.getNativeInnerHeight(scContent.htmlElement));
});
and with another some other event handlers, and this doesn't appear to be slow in my browser (or at least it won't annoy users nearly as much as objects which don't resize).
Why doesn't Smartclient just do this automatically? Is there some individual event SC could listen to (or which I could listen to)?