Mercurial > hg > orthanc-stone
diff Framework/Viewport/WebAssemblyViewport.h @ 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 | df8bf351c23f |
children | 30deba7bc8e2 |
line wrap: on
line diff
--- a/Framework/Viewport/WebAssemblyViewport.h Tue Apr 14 14:57:06 2020 +0200 +++ b/Framework/Viewport/WebAssemblyViewport.h Wed Apr 15 12:57:36 2020 +0200 @@ -48,8 +48,8 @@ private: class WasmLock; - std::string shortCanvasId_; - std::string fullCanvasId_; + std::string canvasId_; + std::string canvasCssSelector_; std::unique_ptr<ICompositor> compositor_; std::unique_ptr<ViewportController> controller_; std::unique_ptr<IViewportInteractor> interactor_; @@ -105,14 +105,18 @@ */ void AcquireInteractor(IViewportInteractor* interactor); - const std::string& GetShortCanvasId() const + const std::string& GetCanvasId() const { - return shortCanvasId_; + return canvasId_; } - const std::string& GetFullCanvasId() const + /** + emscripten functions requires the css selector for the canvas. This is + different from the canvas id (the syntax is '#mycanvasid') + */ + const std::string& GetCanvasCssSelector() const { - return fullCanvasId_; + return canvasCssSelector_; } }; }