Skip to content

Commit

Permalink
Fixed Safari related JavaScript issue
Browse files Browse the repository at this point in the history
  • Loading branch information
donovan6000 committed Dec 4, 2016
1 parent 36fd30d commit d2159e2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 12 deletions.
4 changes: 4 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog:

V1.13 December 3rd, 2016

* Fixed Safari related JavaScript issue

V1.12 December 3rd, 2016

* Made model editor's raft display more efficient
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### Description
M33 Fio is a general purpose plugin for [OctoPrint](http://octoprint.org/) that extends its capabilities to include many useful feature like the ability to use a Micro 3D printer, modify a model before printing it, host a webcam stream, and much more.

The latest version of M33 Fio is V1.12 released on December 3rd, 2016, and an entire changelog for it can be found [here](https://raw.githubusercontent.com/donovan6000/M33-Fio/master/Changelog).
The latest version of M33 Fio is V1.13 released on December 3rd, 2016, and an entire changelog for it can be found [here](https://raw.githubusercontent.com/donovan6000/M33-Fio/master/Changelog).

### Features
* Adds a model viewer tab to OctoPrint's interface where any uploaded model can be viewed
Expand Down
24 changes: 14 additions & 10 deletions octoprint_m33fio/static/js/m33fio.js
Original file line number Diff line number Diff line change
Expand Up @@ -1427,19 +1427,23 @@ $(function() {
// Update grid
updateGrid: function() {

// Check if grid already exists
if(modelViewer.grid !== null) {
// Check if model viewer was created
if(modelViewer.scene !== null) {

// Check if grid already exists
if(modelViewer.grid !== null) {

// Remove grid from scene
modelViewer.scene.remove(modelViewer.grid);
modelViewer.grid = null;
}
// Remove grid from scene
modelViewer.scene.remove(modelViewer.grid);
modelViewer.grid = null;
}

// Create grid
modelViewer.grid = createGrid(self.printerProfile.currentProfileData().volume.width(), self.printerProfile.currentProfileData().volume.depth(), self.printerProfile.currentProfileData().volume.formFactor(), self.printerProfile.currentProfileData().volume.origin());
// Create grid
modelViewer.grid = createGrid(self.printerProfile.currentProfileData().volume.width(), self.printerProfile.currentProfileData().volume.depth(), self.printerProfile.currentProfileData().volume.formFactor(), self.printerProfile.currentProfileData().volume.origin());

// Add grid to scene
modelViewer.scene.add(modelViewer.grid);
// Add grid to scene
modelViewer.scene.add(modelViewer.grid);
}
},

// Load model
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-M33Fio"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "1.12"
plugin_version = "1.13"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit d2159e2

Please sign in to comment.