Resize html element to full window

  • 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 )

    // 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;[/code:2c9jbbdi]
    
    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:2c9jbbdi]// Truncate to canvas size
    if (left < 0)
    	left = 0;
    if (top < 0)
    	top = 0;
    if (right > rightEdge)
    	right = rightEdge;
    if (bottom > bottomEdge)
    	bottom = bottomEdge;[/code:2c9jbbdi]
    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?
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)