Skip to content
Snippets Groups Projects

use iframeId as it has as value `marviniframe`

Merged Bryan BRANCOTTE requested to merge marvinjs-reusable into master
1 file
+ 3
3
Compare changes
  • Side-by-side
  • Inline
@@ -6,7 +6,7 @@ class MarvinModal {
this.textAreaEl = $('#' + textAreaId);
this.exportCallback = exportCallback;
this.marvinSketcherInstance = null;
MarvinJSUtil.getEditor("marviniframe").then(function(sketcherInstance) {
MarvinJSUtil.getEditor(iframeId).then(function(sketcherInstance) {
this.marvinSketcherInstance = sketcherInstance;
this.marvinSketcherInstance.on('molchange', function(){
this.exportSmiles(function(smilesString){
@@ -17,8 +17,8 @@ class MarvinModal {
this.modalEl.on('shown.bs.modal', function(){
//NB: this must be setup only once the modal is shown otherwise
// it doesn't work with Firefox (see https://bugzilla.mozilla.org/show_bug.cgi?id=941146)
var query = $('#marviniframe').attr('data-smiles');
var fingerprint = $('#marviniframe').attr('data-fingerprint');
var query = this.iframeEl.attr('data-smiles');
var fingerprint = this.iframeEl.attr('data-fingerprint');
$("input[name=fingerprint][value=" + fingerprint + "]").attr('checked', 'checked')
this.importSmiles(query);
this.textAreaEl.val(query);
Loading