Mercurial > hg > orthanc-stone
diff Framework/Viewport/WebAssemblyCairoViewport.cpp @ 1351:1b8e37770d78 broker
ID vs CSS selector distinction in API and field names.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 15 Apr 2020 12:57:36 +0200 |
parents | ab81ee8fce1f |
children | 30deba7bc8e2 |
line wrap: on
line diff
--- a/Framework/Viewport/WebAssemblyCairoViewport.cpp Tue Apr 14 14:57:06 2020 +0200 +++ b/Framework/Viewport/WebAssemblyCairoViewport.cpp Wed Apr 15 12:57:36 2020 +0200 @@ -31,7 +31,7 @@ unsigned int& height) { double w, h; - emscripten_get_element_css_size(GetFullCanvasId().c_str(), &w, &h); + emscripten_get_element_css_size(GetCanvasCssSelector().c_str(), &w, &h); /** * Emscripten has the function emscripten_get_element_css_size() @@ -105,7 +105,7 @@ const ctx = document.getElementById(UTF8ToString($0)).getContext('2d'); ctx.putImageData(img, 0, 0); }, - GetShortCanvasId().c_str(), // $0 + GetCanvasId().c_str(), // $0 javascript_->GetBuffer(), // $1 javascript_->GetWidth(), // $2 javascript_->GetHeight()); // $3 @@ -116,7 +116,7 @@ { unsigned int width, height; GetCanvasSize(width, height); - emscripten_set_canvas_element_size(GetFullCanvasId().c_str(), width, height); + emscripten_set_canvas_element_size(GetCanvasCssSelector().c_str(), width, height); dynamic_cast<CairoCompositor&>(compositor).UpdateSize(width, height); } @@ -128,7 +128,7 @@ { unsigned int width, height; GetCanvasSize(width, height); - emscripten_set_canvas_element_size(GetFullCanvasId().c_str(), + emscripten_set_canvas_element_size(GetCanvasCssSelector().c_str(), width, height);