mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
get the JS wrappers working again (#4056)
This commit is contained in:
@@ -18,12 +18,17 @@
|
||||
|
||||
using namespace RDKit;
|
||||
|
||||
extern std::string process_details(const std::string &details,
|
||||
unsigned int &width, unsigned int &height,
|
||||
int &offsetx, int &offsety,
|
||||
std::string &legend,
|
||||
std::vector<int> &atomIds,
|
||||
std::vector<int> &bondIds);
|
||||
|
||||
|
||||
|
||||
namespace RDKit {
|
||||
namespace MinimalLib{
|
||||
extern std::string process_details(const std::string &details, unsigned int &width,
|
||||
unsigned int &height, int &offsetx, int &offsety,
|
||||
std::string &legend, std::vector<int> &atomIds,
|
||||
std::vector<int> &bondIds);
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
std::string draw_to_canvas_with_offset(JSMol &self, emscripten::val canvas,
|
||||
@@ -65,7 +70,7 @@ std::string draw_to_canvas_with_highlights(JSMol &self, emscripten::val canvas,
|
||||
int offsetx = 0;
|
||||
int offsety = 0;
|
||||
std::string legend = "";
|
||||
auto problems = process_details(details, w, h, offsetx, offsety, legend,
|
||||
auto problems = MinimalLib::process_details(details, w, h, offsetx, offsety, legend,
|
||||
atomIds, bondIds);
|
||||
if (!problems.empty()) {
|
||||
return problems;
|
||||
@@ -146,4 +151,4 @@ EMSCRIPTEN_BINDINGS(RDKit_minimal) {
|
||||
function("get_inchikey_for_inchi", &get_inchikey_for_inchi);
|
||||
function("get_mol", &get_mol, allow_raw_pointers());
|
||||
function("get_qmol", &get_qmol, allow_raw_pointers());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user