Skip to content

Commit

Permalink
Use unscaled stage coordinates on HTML5 for now
Browse files Browse the repository at this point in the history
  • Loading branch information
jgranick committed Oct 18, 2016
1 parent 60d6780 commit 3b4b184
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions openfl/display/Stage.hx
Expand Up @@ -1330,6 +1330,11 @@ class Stage extends DisplayObjectContainer implements IModule {
var windowWidth = Std.int (window.width * window.scale);
var windowHeight = Std.int (window.height * window.scale);

#if (js && html5)
__logicalWidth = window.width;
__logicalHeight = window.height;
#end

__displayMatrix.identity ();

if (__logicalWidth == 0 && __logicalHeight == 0) {
Expand Down
2 changes: 1 addition & 1 deletion openfl/text/TextField.hx
Expand Up @@ -863,7 +863,7 @@ class TextField extends InteractiveObject {

var cacheWidth = __textEngine.width;
var cacheHeight = __textEngine.height;

__textEngine.update ();

if (__textEngine.autoSize != NONE) {
Expand Down

0 comments on commit 3b4b184

Please sign in to comment.