Skip to content

Commit

Permalink
fix: add initParamsValidationRules
Browse files Browse the repository at this point in the history
  • Loading branch information
ElisavetAmpatzidou committed May 28, 2022
1 parent 13a8bf4 commit f764781
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 14 deletions.
4 changes: 2 additions & 2 deletions clip/clip.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const clip = new HTMLClip({
html,
css,
host: document.getElementById("clip"),
// initParamsValidationRules,
initParamsValidationRules,
initParams: initParams[0].value,
containerParams: {
width: "800px",
Expand Down Expand Up @@ -69,7 +69,7 @@ clip.addIncident(clip3,8000);
clip.addIncident(moveRight("0%",".texture",4500),8500)
clip.addIncident(clip4,13000);
clip.addIncident(moveBottom("-30%",".texture",4500),13500)
// clip.addIncident(clip5,18000);
clip.addIncident(clip5,18000);
clip.addIncident(moveBottom("0%",".texture",4500),18500)
clip.addIncident(clip6,23000);
clip.addIncident(moveRight("-20%",".texture",4500),23500)
Expand Down
114 changes: 102 additions & 12 deletions clip/initParamsValidationRules.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,105 @@
export default {
color: {
label: "Text Color",
type: "color",
optional: true,
default: "white",
},
fontSize: {
label: "Font size",
type: "measurement",
units: ["px"],
optional: true,
default: "12px",
song: {
label: "Song",
type: "string",
optional: false,
},
intro: {
label: "Intro Slide",
type: "object",
optional: false,
props:{
title:"array",
subtitle:"array",
backgroundImage:"string"
}
},
slide1: {
label: "Slide 1",
type: "object",
optional: false,
props:{
backgroundImage:"string",
centerImage:"string",
year:"string",
backgroundText1:"string",
backgroundText2: "string",
textEffect:"string"
}
},
slide2: {
label: "Slide 2",
type: "object",
optional: false,
props:{
backgroundImage:"string",
centerImage:"string",
year:"string",
backgroundText1:"string",
backgroundText2: "string",
textEffect:"string"
}
},
slide3: {
label: "Slide 3",
type: "object",
optional: false,
props:{
backgroundImage:"string",
centerImage:"string",
year:"string",
backgroundText1:"string",
backgroundText2: "string",
textEffect:"string"
}
},
slide4: {
label: "Slide 4",
type: "object",
optional: false,
props:{
backgroundImage:"string",
centerImage:"string",
year:"string",
backgroundText1:"string",
backgroundText2: "string",
textEffect:"string"
}
},
slide5: {
label: "Slide 5",
type: "object",
optional: false,
props:{
backgroundImage:"string",
centerImage:"string",
year:"string",
backgroundText1:"string",
backgroundText2: "string",
textEffect:"string"
}
},
slide6: {
label: "Slide 6",
type: "object",
optional: false,
props:{
backgroundImage:"string",
centerImage:"string",
year:"string",
backgroundText1:"string",
backgroundText2: "string",
textEffect:"string"
}
},
outro: {
label: "Outro Slide",
type: "object",
optional: false,
props:{
title:"array",
subtitle:"array",
backgroundImage:"string"
}
},
};

0 comments on commit f764781

Please sign in to comment.