From b2c7ddbd056813131fdad8a0c5da05bc1f125f77 Mon Sep 17 00:00:00 2001 From: LaShonda Hopper Date: Thu, 15 Feb 2018 14:52:16 -0500 Subject: [PATCH 1/2] [Case 4315] Particle System Tab has additional color picker support (details below). * Adds 3 additional keys/properties to hifi-entity-ui's specification support for color pickers. * layoutType: This correlates to colpick's layout property. This is expected to be a string. Valid values are those supported by colpick, see colpick.js for additional details. * Within hifi-entity-ui, if this value isn't specified the default is "hex" as was previously hard coded. * layoutColorScheme: This correlates to colpicks's colorScheme property. This is expected to be a string. Valid values are those supported by colpick, see colpick.js for additional details. * Within hifi-entity-ui, if this value isn't specified the default is "dark" as was previously hard coded. * useSubmitButton: This correlates to colpick's submit property. This is expected to be a boolean. See colpick.js for additional details. * Within hifi-entity-ui, if this value isn't specified the default is true as was previously hard coded. * Amends particleExplorer.js color picker descriptors to make use of the new keys to bring the color pickers within the Particle Tab inline with the appearance of the Properties Tab color pickers submitted within PR #12241 which don't utilize the OK button. Changes Committed: modified: scripts/system/particle_explorer/hifi-entity-ui.js modified: scripts/system/particle_explorer/particleExplorer.js --- .../particle_explorer/hifi-entity-ui.js | 5 +++-- .../particle_explorer/particleExplorer.js | 20 +++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/scripts/system/particle_explorer/hifi-entity-ui.js b/scripts/system/particle_explorer/hifi-entity-ui.js index 720aaee4d9..05b6ba6f75 100644 --- a/scripts/system/particle_explorer/hifi-entity-ui.js +++ b/scripts/system/particle_explorer/hifi-entity-ui.js @@ -439,8 +439,9 @@ HifiEntityUI.prototype = { $colPickContainer.colpick({ - colorScheme: 'dark', - layout: 'hex', + colorScheme: (group.layoutColorScheme === undefined ? 'dark' : group.layoutColorScheme), + layout: (group.layoutType === undefined ? 'hex' : group.layoutType), + submit: (group.useSubmitButton === undefined ? true : group.useSubmitButton), color: { r: domArray[0].value, g: domArray[1].value, diff --git a/scripts/system/particle_explorer/particleExplorer.js b/scripts/system/particle_explorer/particleExplorer.js index 971798828f..3598f30ee0 100644 --- a/scripts/system/particle_explorer/particleExplorer.js +++ b/scripts/system/particle_explorer/particleExplorer.js @@ -236,7 +236,10 @@ red: 255, green: 255, blue: 255 - } + }, + layoutType: "hex", + layoutColorScheme: "dark", + useSubmitButton: false }, { type: "Row" @@ -249,7 +252,10 @@ red: 0, green: 0, blue: 0 - } + }, + layoutType: "hex", + layoutColorScheme: "dark", + useSubmitButton: false }, { type: "Row" @@ -262,7 +268,10 @@ red: 255, green: 255, blue: 255 - } + }, + layoutType: "hex", + layoutColorScheme: "dark", + useSubmitButton: false }, { type: "Row" @@ -275,7 +284,10 @@ red: 255, green: 255, blue: 255 - } + }, + layoutType: "hex", + layoutColorScheme: "dark", + useSubmitButton: false }, { type: "Row" From fde1ca62620e162c4804e6da8ab01f3ff0aa6256 Mon Sep 17 00:00:00 2001 From: LaShonda Hopper Date: Thu, 22 Feb 2018 14:49:15 -0500 Subject: [PATCH 2/2] [Case 4315] Ensures that Particle Tab Color Pickers obey colpick visual styling. Changes Committed: modified: scripts/system/particle_explorer/particleExplorer.html --- scripts/system/particle_explorer/particleExplorer.html | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/system/particle_explorer/particleExplorer.html b/scripts/system/particle_explorer/particleExplorer.html index 48cd4afa06..ab4c249cc3 100644 --- a/scripts/system/particle_explorer/particleExplorer.html +++ b/scripts/system/particle_explorer/particleExplorer.html @@ -27,6 +27,7 @@ +