view Platforms/Wasm/WasmViewport.cpp @ 457:3b4df9925db6 am-touch-events

added support for 'touch' in mouse trackers. This is still a bit hacky and we need to refactor it to make it clean. Thanks to that, Pan and zoom are available together with 2 touches
author Alain Mazy <alain@mazy.be>
date Thu, 24 Jan 2019 16:42:27 +0100
parents 092db46c6291
children 4f2416d519b4
line wrap: on
line source

#include "WasmViewport.h"

#include <vector>
#include <memory>

std::vector<std::shared_ptr<OrthancStone::WidgetViewport>> wasmViewports;

void AttachWidgetToWasmViewport(const char* htmlCanvasId, OrthancStone::IWidget* centralWidget) {
    std::shared_ptr<OrthancStone::WidgetViewport> viewport(CreateWasmViewportFromCpp(htmlCanvasId));
    viewport->SetCentralWidget(centralWidget);

    wasmViewports.push_back(viewport);
}