smoosic 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/favicon.ico +0 -0
- package/build/smoosic.js +6 -6
- package/package.json +2 -2
- package/release/smoosic.js +6 -6
- package/release/styles/media.css +2 -3
- package/src/render/sui/mapper.ts +4 -0
- package/src/styles/media.css +2 -3
- package/src/ui/components/dialogs/partInfo.vue +13 -22
- package/src/ui/components/dialogs/scoreTranspose.vue +1 -3
- package/src/ui/dialogs/partInfo.ts +5 -3
package/release/styles/media.css
CHANGED
|
@@ -278,9 +278,8 @@ body.printing .media div.d-flex
|
|
|
278
278
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
body.printing .workspace-container
|
|
282
|
-
|
|
283
|
-
}
|
|
281
|
+
body.printing .workspace-container,
|
|
282
|
+
body.printing #top-bar ,
|
|
284
283
|
body.printing .controls-left,
|
|
285
284
|
body.printing .control-bar
|
|
286
285
|
{
|
package/src/render/sui/mapper.ts
CHANGED
|
@@ -209,6 +209,10 @@ export abstract class SuiMapper {
|
|
|
209
209
|
|
|
210
210
|
_copySelectionsByMeasure(staffIndex: number, measureIndex: number) {
|
|
211
211
|
const rv = this.selections.filter((sel) => sel.selector.staff === staffIndex && sel.selector.measure === measureIndex);
|
|
212
|
+
const missingNotes = rv.filter((sel) => !sel.note);
|
|
213
|
+
if (rv.length < 1 || missingNotes.length > 0) {
|
|
214
|
+
return { ticks: 0, selectors: []};
|
|
215
|
+
}
|
|
212
216
|
const ticks = rv.length < 1 ? 0 : rv.map((sel) => (sel.note as SmoNote).tickCount).reduce((a, b) => a + b);
|
|
213
217
|
const selectors: SmoSelector[] = [];
|
|
214
218
|
rv.forEach((sel) => {
|
package/src/styles/media.css
CHANGED
|
@@ -278,9 +278,8 @@ body.printing .media div.d-flex
|
|
|
278
278
|
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
body.printing .workspace-container
|
|
282
|
-
|
|
283
|
-
}
|
|
281
|
+
body.printing .workspace-container,
|
|
282
|
+
body.printing #top-bar ,
|
|
284
283
|
body.printing .controls-left,
|
|
285
284
|
body.printing .control-bar
|
|
286
285
|
{
|
|
@@ -18,26 +18,8 @@ interface Props {
|
|
|
18
18
|
const props = defineProps<Props>();
|
|
19
19
|
const { domId, label, commitCb, cancelCb, updatePartInfoCb } = { ...props };
|
|
20
20
|
const partInfo = reactive(new SmoPartInfo(props.partInfo));
|
|
21
|
-
type numberTypes = 'pageWidth' | 'pageHeight' | 'zoomScale' | 'svgScale' | 'noteSpacing' | 'maxMeasureSystem';
|
|
22
21
|
|
|
23
|
-
const writeStringValue = async (attr: SmoPartInfoStringType, value: string) => {
|
|
24
|
-
if (partInfo[attr] === value) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
partInfo[attr] = value;
|
|
28
|
-
await updatePartInfoCb(partInfo);
|
|
29
|
-
}
|
|
30
|
-
const writeNumberValue = async (attr: SmoPartInfoNumType, value: number) => {
|
|
31
|
-
if (partInfo[attr] === value) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
partInfo[attr] = value;
|
|
35
|
-
await updatePartInfoCb(partInfo);
|
|
36
|
-
}
|
|
37
22
|
const writeBooleanValue = async (attr: SmoPartInfoBooleanType, value: boolean) => {
|
|
38
|
-
if (partInfo[attr] === value) {
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
23
|
partInfo[attr] = value;
|
|
42
24
|
await updatePartInfoCb(partInfo);
|
|
43
25
|
}
|
|
@@ -69,6 +51,7 @@ const predefinedDimensions: { [key: string]: dimensions } = {
|
|
|
69
51
|
// Page size is in pixels, but if it matches a preset we just show that.
|
|
70
52
|
// User chooses 'custom' to unlock width/height editing.
|
|
71
53
|
const pageSize = ref('custom');
|
|
54
|
+
|
|
72
55
|
const pageChange = () => {
|
|
73
56
|
Object.keys(predefinedDimensions).forEach((key) => {
|
|
74
57
|
const dims = predefinedDimensions[key];
|
|
@@ -78,6 +61,15 @@ const pageChange = () => {
|
|
|
78
61
|
}
|
|
79
62
|
});
|
|
80
63
|
};
|
|
64
|
+
const pageSizeCb = async (val: string) => {
|
|
65
|
+
const dims = predefinedDimensions[val];
|
|
66
|
+
if (dims) {
|
|
67
|
+
partInfo.layoutManager.globalLayout.pageWidth = dims.width;
|
|
68
|
+
partInfo.layoutManager.globalLayout.pageHeight = dims.height;
|
|
69
|
+
}
|
|
70
|
+
pageSize.value = val;
|
|
71
|
+
// The watch will trigger the callback
|
|
72
|
+
}
|
|
81
73
|
const lockDimensions = ref(false);
|
|
82
74
|
pageChange();
|
|
83
75
|
watch (pageSize, async (newVal) => {
|
|
@@ -160,18 +152,17 @@ const getId = (str: string) => {
|
|
|
160
152
|
</div>
|
|
161
153
|
<div class="row mb-2 align-items-center">
|
|
162
154
|
<div class="col col-1">
|
|
163
|
-
<input class="form-check-input" type="checkbox" v-model="
|
|
164
|
-
@change="writeBooleanValue('preserveTextGroups', partInfo.preserveTextGroups)"></input>
|
|
155
|
+
<input class="form-check-input" type="checkbox" v-model="includeNext" :id="getId('includeNext')"></input>
|
|
165
156
|
</div>
|
|
166
157
|
<div class="col col-5">
|
|
167
|
-
<label class="form-check-label" :for="getId('
|
|
158
|
+
<label class="form-check-label" :for="getId('includeNext')">Include Next Stave</label>
|
|
168
159
|
</div>
|
|
169
160
|
</div>
|
|
170
161
|
<div class="row mb-2">
|
|
171
162
|
<div class="col col-3 text-end">Page Size</div>
|
|
172
163
|
<div class="col col-6">
|
|
173
164
|
<selectComp :domId="getId('page-size-select')" :label="''" :selections="pageSizes" :initialValue="pageSize"
|
|
174
|
-
:changeCb="
|
|
165
|
+
:changeCb="pageSizeCb" />
|
|
175
166
|
</div>
|
|
176
167
|
</div>
|
|
177
168
|
<div class="row mb-2 align-items-center">
|
|
@@ -18,9 +18,6 @@ const transposeIndex: Ref<number> = getTranspose();
|
|
|
18
18
|
const xposeCb = async (val: number) => {
|
|
19
19
|
transposeIndex.value = val;
|
|
20
20
|
};
|
|
21
|
-
const getDomId = () => {
|
|
22
|
-
return `attr-modal-dialog-${domId}`;
|
|
23
|
-
}
|
|
24
21
|
const getId = (str: string) => {
|
|
25
22
|
return `${domId}-${str}`;
|
|
26
23
|
}
|
|
@@ -30,6 +27,7 @@ const getId = (str: string) => {
|
|
|
30
27
|
<div class="row mb-2 ms-2">
|
|
31
28
|
<div class="col col-9 pe-0 me-n2">
|
|
32
29
|
<numberInputApp :domId="getId('page-width-input')" :initialValue="transposeIndex" :precision="0"
|
|
30
|
+
:minValue="-12" :maxValue="12"
|
|
33
31
|
:changeCb="xposeCb" :disabled="false"/>
|
|
34
32
|
</div>
|
|
35
33
|
<div class="col col-3 text-start ps-0 pe-0 ms-n4">
|
|
@@ -20,13 +20,15 @@ export const SuiPartInfoDialogVue = async (parameters: SuiDialogParams) => {
|
|
|
20
20
|
// Since update will change the displayed score, wait for any display change to complete first.
|
|
21
21
|
await parameters.view.renderer.updatePromise();
|
|
22
22
|
|
|
23
|
+
await parameters.view.updatePartInfo(partInfo);
|
|
23
24
|
// If we are expanding rests, we need to reload the part after setting the
|
|
24
25
|
// part change. So we update the part display a second time with the new value.
|
|
25
|
-
if (current.expandMultimeasureRests !== partInfo.expandMultimeasureRests
|
|
26
|
+
if (current.expandMultimeasureRests !== partInfo.expandMultimeasureRests ||
|
|
27
|
+
current.stavesAfter !== partInfo.stavesAfter) {
|
|
26
28
|
parameters.view.resetPartView();
|
|
29
|
+
await parameters.view.refreshViewport();
|
|
27
30
|
}
|
|
28
|
-
|
|
29
|
-
current = backup;
|
|
31
|
+
current = new SmoPartInfo(partInfo);
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
const commitCb = async () => {
|