Skip to content

Commit

Permalink
fix last buble
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvl01 committed Mar 23, 2023
1 parent 2c68b61 commit 75311ae
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 8 deletions.
4 changes: 4 additions & 0 deletions clip/clip.css
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,10 @@
overflow: hidden;
}

.text-bg-last-child{
top: -360px;
left: -893px
}

.tr-center{
left: 50%;
Expand Down
19 changes: 14 additions & 5 deletions clip/clip.html

Large diffs are not rendered by default.

41 changes: 40 additions & 1 deletion clip/clip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ setCSSCore(AnimePluginDefinition.CSSEffect);

import initParams from "./initParams";
import initParamsValidationRules from "./initParamsValidationRules";
import { Top } from "./effects/Top";

const clip = new HTMLClip({
html,
Expand Down Expand Up @@ -62,7 +63,45 @@ clip.addIncident(
),
0
);

clip.addIncident(
Top(
".text-bg-last",
600,
"-640px",
"@expression(ceil(initParams.products.length * 4240))"
),
0
);
clip.addIncident(
Left(
".text-bg-last",
600,
"-106px",
"@expression(ceil(initParams.products.length * 4240))"
),
0
);
clip.addIncident(
Top(
".text-bg-last-child",
600,
"640px",
"@expression(ceil(initParams.products.length * 4240))"
),
0
);
clip.addIncident(
Left(
".text-bg-last-child",
600,
"106px",
"@expression(ceil(initParams.products.length * 4240))"
),
0
);
//.text-bg-last-child
// top: "640px",
// left: "107px",
clip.addIncident(
Opacity(
".text-bg-last",
Expand Down
4 changes: 2 additions & 2 deletions clip/effects/Combo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const comboinc = (selector) =>
width: "2000px",
height: "2000px",
top: "-640px",
left: "-106px",
left: "-107px",
},
initialValues: {
width: "0px",
Expand All @@ -53,7 +53,7 @@ export const comboinc = (selector) =>
},
initialValues: {
top: "-360px",
left: "-893px",
left: "-894px",
},
},
props: {
Expand Down
17 changes: 17 additions & 0 deletions clip/effects/Top.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*This incident is export as function so you can use it more than one times*/

import { CSSEffect } from "@donkeyclip/motorcortex";
export const Top = (selector, duration, value, delay, easing = "linear") =>
new CSSEffect(
{
animatedAttrs: {
top: value,
},
},
{
selector,
duration,
easing,
delay,
}
);

0 comments on commit 75311ae

Please sign in to comment.