Browse Source

Fix wasm regressions with latest changes

Signed-off-by: falkTX <falktx@falktx.com>
pull/507/head
falkTX 1 month ago
parent
commit
b86b88c1a4
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 0 additions and 18 deletions
  1. +0
    -3
      Makefile.plugins.mk
  2. +0
    -15
      dgl/src/pugl-extra/wasm.c

+ 0
- 3
Makefile.plugins.mk View File

@@ -369,9 +369,6 @@ JACK_LIBS += -Wl,-subsystem,windows
endif

ifeq ($(WASM),true)
ifeq ($(MAPI_MODULE_NAME),)
$(error MAPI_MODULE_NAME property is requires for Web-Assembly MAPI builds)
endif
MAPI_EXT = -mapi.js
MAPI_SHARED = \
-sEXPORT_NAME="$(MAPI_MODULE_NAME)" \


+ 0
- 15
dgl/src/pugl-extra/wasm.c View File

@@ -110,21 +110,6 @@ puglUpdateSizeHints(PuglView* const view)
canvasWrapper.style.setProperty("max-height", height + 'px');
}, className, size.width, size.height);
} else {
const PuglArea defaultSize = view->sizeHints[PUGL_DEFAULT_SIZE];
if (puglIsValidArea(defaultSize)) {
EM_ASM({
var canvasWrapper = document.getElementById(UTF8ToString($0)).parentElement;
canvasWrapper.style.setProperty("width", parseInt($1 / window.devicePixelRatio) + 'px');
canvasWrapper.style.setProperty("height", parseInt($2 / window.devicePixelRatio) + 'px');
}, className, defaultSize.width, defaultSize.height);
} else {
EM_ASM({
var canvasWrapper = document.getElementById(UTF8ToString($0)).parentElement;
canvasWrapper.style.removeProperty("width");
canvasWrapper.style.removeProperty("height");
}, className);
}

const PuglArea minSize = view->sizeHints[PUGL_MIN_SIZE];
if (puglIsValidArea(minSize)) {
EM_ASM({


Loading…
Cancel
Save