diff --git a/app/imports/api/creature/CreatureProperties.js b/app/imports/api/creature/CreatureProperties.js index bef226aa..ad0debf3 100644 --- a/app/imports/api/creature/CreatureProperties.js +++ b/app/imports/api/creature/CreatureProperties.js @@ -2,6 +2,7 @@ import { Meteor } from 'meteor/meteor'; import { Mongo } from 'meteor/mongo'; import { ValidatedMethod } from 'meteor/mdg:validated-method'; import SimpleSchema from 'simpl-schema'; +import ColorSchema from '/imports/api/properties/subSchemas/ColorSchema.js'; import ChildSchema, { RefSchema } from '/imports/api/parenting/ChildSchema.js'; import { recomputeCreature } from '/imports/api/creature/computation/recomputeCreature.js'; import LibraryNodes from '/imports/api/library/LibraryNodes.js'; @@ -41,6 +42,7 @@ for (let key in propertySchemasIndex){ let schema = new SimpleSchema({}); schema.extend(propertySchemasIndex[key]); schema.extend(CreaturePropertySchema); + schema.extend(ColorSchema); schema.extend(ChildSchema); schema.extend(SoftRemovableSchema); CreatureProperties.attachSchema(schema, { diff --git a/app/imports/api/library/LibraryNodes.js b/app/imports/api/library/LibraryNodes.js index b6932bb9..1289b8dd 100644 --- a/app/imports/api/library/LibraryNodes.js +++ b/app/imports/api/library/LibraryNodes.js @@ -2,6 +2,7 @@ import { Meteor } from 'meteor/meteor'; import { Mongo } from 'meteor/mongo'; import { ValidatedMethod } from 'meteor/mdg:validated-method'; import SimpleSchema from 'simpl-schema'; +import ColorSchema from '/imports/api/properties/subSchemas/ColorSchema.js'; import ChildSchema from '/imports/api/parenting/ChildSchema.js'; import propertySchemasIndex from '/imports/api/properties/propertySchemasIndex.js'; import Libraries from '/imports/api/library/Libraries.js'; @@ -28,6 +29,7 @@ let LibraryNodeSchema = new SimpleSchema({ for (let key in propertySchemasIndex){ let schema = new SimpleSchema({}); schema.extend(LibraryNodeSchema); + schema.extend(ColorSchema); schema.extend(propertySchemasIndex[key]); schema.extend(ChildSchema); schema.extend(SoftRemovableSchema); diff --git a/app/imports/api/parenting/order.js b/app/imports/api/parenting/order.js index ebcb9c96..c94e814b 100644 --- a/app/imports/api/parenting/order.js +++ b/app/imports/api/parenting/order.js @@ -133,7 +133,7 @@ export function reorderDocs({collection, ancestorId}){ }); } }); - if (Meteor.isServer){ + if (Meteor.isServer && bulkWrite.length){ collection.rawCollection().bulkWrite( bulkWrite, {ordered : false}, diff --git a/app/imports/ui/components/ColorPicker.vue b/app/imports/ui/components/ColorPicker.vue index 1c0a5e86..aa0c3697 100644 --- a/app/imports/ui/components/ColorPicker.vue +++ b/app/imports/ui/components/ColorPicker.vue @@ -27,7 +27,7 @@ > check @@ -49,13 +49,13 @@
check @@ -104,9 +104,9 @@ // Create an index of hex colors and what color/shade combination makes them let colorIndex = {}; for (let color in vuetifyColors){ - color = camelToKebabCase(color); + color = kebabToCamelCase(color); for (let shade in vuetifyColors[color]){ - shade = camelToKebabCase(shade); + shade = kebabToCamelCase(shade); colorIndex[vuetifyColors[color][shade]] = {color, shade}; } } @@ -167,7 +167,6 @@ return this.combination && this.combination.color; }, set(newColor){ - console.log(newColor, colorToHex(newColor, this.shade)); this.$emit('input', colorToHex(newColor, this.shade)); }, }, @@ -176,7 +175,6 @@ return this.combination && this.combination.shade; }, set(newShade){ - console.log(newShade, colorToHex(this.color, newShade)); this.$emit('input', colorToHex(this.color, newShade)); }, }, diff --git a/app/imports/ui/components/propertyToolbar.vue b/app/imports/ui/components/propertyToolbar.vue index b77be63b..6ef944e4 100644 --- a/app/imports/ui/components/propertyToolbar.vue +++ b/app/imports/ui/components/propertyToolbar.vue @@ -21,7 +21,7 @@ > diff --git a/app/imports/ui/properties/shared/PropertyIcon.vue b/app/imports/ui/properties/shared/PropertyIcon.vue index abec4576..56b90e9c 100644 --- a/app/imports/ui/properties/shared/PropertyIcon.vue +++ b/app/imports/ui/properties/shared/PropertyIcon.vue @@ -1,5 +1,7 @@