Fix -Ddom define (resolve openfl/openfl#2067)
This commit is contained in:
@@ -88,6 +88,11 @@ class HTML5Window {
|
|||||||
var attributes = parent.__attributes;
|
var attributes = parent.__attributes;
|
||||||
if (!Reflect.hasField (attributes, "context")) attributes.context = {};
|
if (!Reflect.hasField (attributes, "context")) attributes.context = {};
|
||||||
|
|
||||||
|
#if dom
|
||||||
|
attributes.context.type = DOM;
|
||||||
|
attributes.context.version = "";
|
||||||
|
#end
|
||||||
|
|
||||||
renderType = attributes.context.type;
|
renderType = attributes.context.type;
|
||||||
|
|
||||||
if (Reflect.hasField (attributes, "element")) {
|
if (Reflect.hasField (attributes, "element")) {
|
||||||
@@ -98,11 +103,6 @@ class HTML5Window {
|
|||||||
|
|
||||||
var element = parent.element;
|
var element = parent.element;
|
||||||
|
|
||||||
#if dom
|
|
||||||
attributes.context.type = DOM;
|
|
||||||
attributes.context.version = "";
|
|
||||||
#end
|
|
||||||
|
|
||||||
if (Reflect.hasField (attributes, "allowHighDPI") && attributes.allowHighDPI && renderType != DOM) {
|
if (Reflect.hasField (attributes, "allowHighDPI") && attributes.allowHighDPI && renderType != DOM) {
|
||||||
|
|
||||||
scale = Browser.window.devicePixelRatio;
|
scale = Browser.window.devicePixelRatio;
|
||||||
|
|||||||
Reference in New Issue
Block a user