diff --git a/examples/particle_explorer/particleExplorer.html b/examples/particle_explorer/particleExplorer.html
index a7700a8c05..a369eaf648 100644
--- a/examples/particle_explorer/particleExplorer.html
+++ b/examples/particle_explorer/particleExplorer.html
@@ -35,6 +35,26 @@ body{
.importer{
margin-bottom:4px;
}
+.exported-props-section {
+ width: 50%;
+ margin: 0 auto;
+
+}
+#exported-props {
+ /* Set the margin-left and margin-right automatically set */
+ color: white;
+ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
+ white-space: -pre-wrap; /* Opera 4-6 */
+ white-space: -o-pre-wrap; /* Opera 7 */
+ white-space: pre-wrap; /* css-3 */
+ word-wrap: break-word; /* Internet Explorer 5.5+ */
+ white-space: -webkit-pre-wrap; /* Newer versions of Chrome/Safari*/
+ word-break: break-all;
+ white-space: normal;
+
+
+}
+
::-webkit-input-placeholder {
text-align: center;
@@ -52,6 +72,8 @@ body{
+
diff --git a/examples/particle_explorer/particleExplorer.js b/examples/particle_explorer/particleExplorer.js
index 7749c93120..66e9c1616a 100644
--- a/examples/particle_explorer/particleExplorer.js
+++ b/examples/particle_explorer/particleExplorer.js
@@ -383,9 +383,9 @@ function importSettings() {
var keys = _.keys(importedSettings);
_.each(keys, function(key) {
- var shouldIgnore = _.contains(keysToIgnore, key);
+ var shouldAllow = _.contains(keysToAllow, key);
- if (shouldIgnore) {
+ if (!shouldAllow) {
return;
}
@@ -406,9 +406,9 @@ function prepareSettingsForExport() {
var exportSettings = {};
_.each(keys, function(key) {
- var shouldIgnore = _.contains(keysToIgnore, key);
+ var shouldAllow = _.contains(keysToAllow, key);
- if (shouldIgnore) {
+ if (!shouldAllow) {
return;
}
@@ -424,7 +424,14 @@ function prepareSettingsForExport() {
}
function showPreselectedPrompt() {
- window.prompt("Ctrl-C to copy, then Enter.", prepareSettingsForExport());
+ var elem = document.getElementById("exported-props");
+ var exportSettings = prepareSettingsForExport();
+ elem.innerHTML = "";
+ elem.appendChild(document.createTextNode(exportSettings));
+ elem.select();
+ document.execCopy('copy');
+
+ //window.alert("Ctrl-C to copy, then Enter.", prepareSettingsForExport());
}
function removeContainerDomElement() {