Skip to content

Commit

Permalink
Merge pull request #278 from Smithsonian/rc-41
Browse files Browse the repository at this point in the history
Merge rc-41
  • Loading branch information
gjcope authored May 22, 2024
2 parents b8d2167 + 438798c commit c08cb20
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "voyager",
"version": "0.40.0",
"version": "0.41.0",
"description": "Smithsonian DPO Voyager - 3D Explorer and Tool Suite",
"scripts": {
"start": "npm run server",
Expand Down
2 changes: 1 addition & 1 deletion source/client/annotations/ExtendedSprite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class ExtendedAnnotation extends AnnotationElement
this.wrapperElement = this.appendElement("div");

this.contentElement = this.createElement("div", null, this.wrapperElement);
this.contentElement.classList.add("sv-content");
this.contentElement.classList.add("sv-annotation-body");
this.contentElement.style.display = "none";
}

Expand Down
2 changes: 2 additions & 0 deletions source/client/components/CVFloor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export default class CVFloor extends CFloor
color: data.color || [ 0.6, 0.75, 0.8 ],
opacity: data.opacity !== undefined ? data.opacity : 0.5,
receiveShadow: !!data.receiveShadow,
autoSize: data.autoSize !== undefined ? data.autoSize : true
});
}

Expand All @@ -138,6 +139,7 @@ export default class CVFloor extends CFloor
color: ins.color.cloneValue(),
opacity: ins.opacity.value,
receiveShadow: ins.receiveShadow.value,
autoSize: this.addIns.autoSize.value
};
}
}
3 changes: 3 additions & 0 deletions source/client/schema/json/setup.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@
},
"receiveShadow": {
"type": "boolean"
},
"autoSize": {
"type": "boolean"
}
}
},
Expand Down
1 change: 1 addition & 0 deletions source/client/schema/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ export interface IFloor
color: number[];
opacity: number;
receiveShadow: boolean;
autoSize: boolean;
}

export interface IGrid
Expand Down
7 changes: 5 additions & 2 deletions source/client/ui/PropertyNumber.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,11 @@ export default class PropertyNumber extends CustomElement
return;
}
let value :number;
if(this.property.schema.percent && text.endsWith("%")){
value = +text.slice(0, -1) /100;
if(this.property.schema.percent){
if(text.endsWith("%")) {
text = text.slice(0, -1);
}
value = +text / 100;
}else{
value = parseFloat(text);
}
Expand Down
2 changes: 1 addition & 1 deletion source/client/ui/PropertyOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default class PropertyOptions extends CustomElement
}
else {
optionsList = options.map((option, index) =>
html`<option value=${index} ?selected=${index === value}>${language ? language.getLocalizedString(option) : option}</option>`)
html`<option value=${index} ?selected=${index == value}>${language ? language.getLocalizedString(option) : option}</option>`)
}

return html`
Expand Down
2 changes: 2 additions & 0 deletions source/client/ui/explorer/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1240,6 +1240,8 @@ $tour-entry-indent: 12px;

.ff-input, select{
text-align: right;
background-image: none;
appearance: auto;
&:focus{
text-align: left;
}
Expand Down
3 changes: 2 additions & 1 deletion source/client/ui/story/ArticleEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import 'tinymce/plugins/media';
/* Import content css */
import contentUiCss from '!!raw-loader!./editor_css/content.ui.min.css';
import contentCss from '!!raw-loader!./editor_css/content.min.css';
import contentOverrides from '!!raw-loader!./editor_css/overrides.css';

import Notification from "@ff/ui/Notification";
import MessageBox from "@ff/ui/MessageBox";
Expand Down Expand Up @@ -214,7 +215,7 @@ export default class ArticleEditor extends SystemView
link_assume_external_targets: 'https',
paste_as_text: true,
content_css: false,
content_style: [contentCss, contentUiCss].join('\n'),
content_style: [contentCss, contentUiCss, contentOverrides].join('\n'),
convert_urls: false,
image_caption: true,
link_default_target: '_blank',
Expand Down
7 changes: 7 additions & 0 deletions source/client/ui/story/editor_css/overrides.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* CSS Rules overrides over tinymce's default styles
*/
.mce-content-body img {
max-width: 100%;
height: auto;
}
3 changes: 2 additions & 1 deletion source/client/ui/story/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ $color-component-meta-light: #d9d998;
.sv-property-view {
flex-grow: 1;
max-width: 100%;
max-height: 1.75rem;
max-height: 2.0em;
display: flex;
margin: 2px 0;

Expand All @@ -419,6 +419,7 @@ $color-component-meta-light: #d9d998;
.ff-label{
padding: 0 2px;
align-self: center;
font-weight: normal;
}

.ff-button.ff-control{
Expand Down
1 change: 1 addition & 0 deletions source/client/ui/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@

img {
max-width: 100%;
height: auto;
}

figure {
Expand Down

0 comments on commit c08cb20

Please sign in to comment.