Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wangjin-front-end
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
张媛
wangjin-front-end
Commits
64c6f071
Commit
64c6f071
authored
Jul 09, 2021
by
张媛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弹幕源码添加
parent
c0752f8a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
codeCom.tsx
src/canvasCom/carouselCom/codeCom.tsx
+2
-2
carousel.stories.tsx
src/canvasStories/carousel.stories.tsx
+1
-1
No files found.
src/canvasCom/carouselCom/codeCom.tsx
View file @
64c6f071
...
@@ -47,14 +47,14 @@ const getItemCodeStr = ()=>{
...
@@ -47,14 +47,14 @@ const getItemCodeStr = ()=>{
class carouselItem extends window.FYGE.Container {
class carouselItem extends window.FYGE.Container {
constructor(data) {
constructor(data) {
super();
super();
let itemBg = window.FYGE.Sprite.fromUrl("
test
/prizeItemBg.png");
let itemBg = window.FYGE.Sprite.fromUrl("
resource
/prizeItemBg.png");
this.addChild(itemBg);
this.addChild(itemBg);
let itemName = new window.FYGE.TextField();
let itemName = new window.FYGE.TextField();
itemName.text = data.name;
itemName.text = data.name;
itemName.size = 24;
itemName.size = 24;
itemName.fillColor = "#000000";
itemName.fillColor = "#000000";
itemName.textAlign = window.FYGE.TEXT_ALIGN.CENTER;
itemName.textAlign = window.FYGE.TEXT_ALIGN.CENTER;
itemName.textWidth =
itemBg.width
;
itemName.textWidth =
194
;
this.addChild(itemName);
this.addChild(itemName);
itemName.position.set(0, 200);
itemName.position.set(0, 200);
let itemImg = window.FYGE.Sprite.fromUrl(data.icon);
let itemImg = window.FYGE.Sprite.fromUrl(data.icon);
...
...
src/canvasStories/carousel.stories.tsx
View file @
64c6f071
...
@@ -19,7 +19,7 @@ class carouselItem extends window.FYGE.Container {
...
@@ -19,7 +19,7 @@ class carouselItem extends window.FYGE.Container {
itemName
.
size
=
24
;
itemName
.
size
=
24
;
itemName
.
fillColor
=
"#000000"
;
itemName
.
fillColor
=
"#000000"
;
itemName
.
textAlign
=
window
.
FYGE
.
TEXT_ALIGN
.
CENTER
;
itemName
.
textAlign
=
window
.
FYGE
.
TEXT_ALIGN
.
CENTER
;
itemName
.
textWidth
=
itemBg
.
width
;
itemName
.
textWidth
=
194
;
this
.
addChild
(
itemName
);
this
.
addChild
(
itemName
);
itemName
.
position
.
set
(
0
,
200
);
itemName
.
position
.
set
(
0
,
200
);
let
itemImg
=
window
.
FYGE
.
Sprite
.
fromUrl
(
data
.
icon
);
let
itemImg
=
window
.
FYGE
.
Sprite
.
fromUrl
(
data
.
icon
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment