Closed wabson closed 10 years ago
I guess dojo in 4.2.d breaks it.
/*
if (typeof define == 'function' && define.amd)
define(function() { return Spinner })
else
*/
window.Spinner = Spinner
in ./META-INF/extras/components/preview/spin.js from version 2.5.1 helped me getting around the problem.
I confirm that the problem exists on 4.2.d Community Edition and deas' fix solves the problem.
I'm not sure I understand what the fix is here. Are you suggesting we should fork the code in spin.js
to add the above snippet? If so then where?
This can be fixed by adding the latest version of spin.js (1.3.2) from
https://raw.github.com/fgnass/spin.js/gh-pages/spin.js
Then comment row 13
/* AMD module */
//else if (typeof define == 'function' && define.amd) define(factory)
As can be noted the code detects the dojo framework and assumes it should be loaded from that framework. Commenting that line and it works again.
Rendering of the viewer currently fails on 4.2.d and an error is logged to the console indicating that the Spinner function (constructor) does not exist.
The spinner source is being loaded correctly, but for some reason the function is not created in the window scope and is not defined during initialisation of the viewer or indeed afterwards (e.g. if tested from the Web Console).
Observed on Chrome 26.