diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js index 84e40b25e88dbaf28313f3daf3f64725cb80e3f2..846f015eefdb851733c80b92b81495efa7e9bf31 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SampleForm/widgets/PlateController.js @@ -18,18 +18,15 @@ function PlateController(sample) { this._plateModel = new PlateModel(sample); this._plateView = new PlateView(this, this._plateModel); + this.getPlaceHolderId = function() { + return this._plateModel.getPlaceHolderId(); + } + this.getPlaceHolder = function() { return this._plateView.getPlaceHolder(); } this.initWithPlaceHolder = function() { - //Delete old view for redraws - Corner Case - var oldPlaceHolderFound = $("#" + this._plateModel.getPlaceHolderId()); - if(oldPlaceHolderFound.length !== 0) { - oldPlaceHolderFound.remove(); - } - - //Normal case var _this = this; var repeatUntilSet = function() { var placeHolderFound = $("#" + _this._plateModel.getPlaceHolderId()); diff --git a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js index c25576a967bfc8d3c9225ad17b6d57c74255903b..f9ed86a7d5db6b1950e4c7fec62073eb35822552 100644 --- a/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js +++ b/plasmid/source/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/legacy/SampleHierarchy.js @@ -331,6 +331,14 @@ function SampleHierarchy(serverFacade, containerId, profile, sample) { if(sample.sampleTypeCode === "PLATE") { var plateController = new PlateController(sample); + + //Delete old view for redraws - Corner Case + var oldPlaceHolderFound = $("#" + plateController.getPlaceHolderId()); + if(oldPlaceHolderFound.length !== 0) { + oldPlaceHolderFound.remove(); + } + + //Normal plate draw using place holder for the svg graph size calculations $nodeContent.append(plateController.getPlaceHolder()); plateController.initWithPlaceHolder(); }