Resize html element to full window

For developers using the Construct 2 Javascript SDK

Post » Wed Jan 20, 2016 8:42 am

@Ashley

When user resizes html element like text box to full window, there will have a margin around this html element created by these code ( runtime.js, line 229 of text box plugin )

Code: Select all
// Truncate to canvas size
if (left < 1)
   left = 1;
if (top < 1)
   top = 1;
if (right >= rightEdge)
   right = rightEdge - 1;
if (bottom >= bottomEdge)
   bottom = bottomEdge - 1;


The position of this html element will not become (0,0). And this html element is smaller than canvas always.

If code changed like
Code: Select all
// Truncate to canvas size
if (left < 0)
   left = 0;
if (top < 0)
   top = 0;
if (right > rightEdge)
   right = rightEdge;
if (bottom > bottomEdge)
   bottom = bottomEdge;

Then the margin will be disappeared.


My question is, why not resize this html element to overlap whole canvas while this html element is larger than canvas?
B
109
S
27
G
276
Posts: 4,480
Reputation: 154,420

Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests