Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
projet-cdaw
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Quentin Vrel
projet-cdaw
Commits
c78e6c7e
Commit
c78e6c7e
authored
Dec 03, 2020
by
quentin.vrel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tile rendering test
parent
77ea1853
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
3 deletions
+13
-3
Tile.vue
frontend/src/components/Tile.vue
+13
-3
No files found.
frontend/src/components/Tile.vue
View file @
c78e6c7e
<
template
>
<div
class=
"tile"
>
<button
class=
"tile-symbol"
>
<button
class=
"tile-symbol"
:id=
"this.id"
>
<img
class=
"tile-background"
:src=
"this.background"
:width=
"this.width"
:height=
"this.height"
/>
<img
class=
"tile-front"
:src=
"this.svg"
:width=
"this.width"
:height=
"this.height"
/>
</button>
...
...
@@ -18,8 +18,9 @@ export default {
},
data
(){
//data must be a function
return
{
tile
:
null
,
//our tile object
tile
:
{
type
:
Tile
}
,
//our tile object
svg
:
null
,
background
:
null
}
},
mounted
(){
//hook on mounted, we init the object. It could have been done before.
...
...
@@ -27,6 +28,7 @@ export default {
this
.
tile
=
new
Tile
(
this
.
id
);
this
.
background
=
require
(
"@/assets/img/mahjong-tiles/Black/Front.svg"
);
this
.
svg
=
require
(
"@/assets/img/mahjong-tiles/Black/"
+
this
.
tile
.
getSVG
());
this
.
id
=
this
.
tile
.
idobject
;
console
.
log
(
this
.
svg
);
}
}
...
...
@@ -34,12 +36,20 @@ export default {
<
style
>
.tile-symbol
{
width
:
50%
;
border-radius
:
10px
;
background
:
transparent
;
border
:
none
;
display
:
contents
;
}
.tile-front
{
position
:
relative
;
display
:
table-caption
;
transform
:
translateX
(
-100%
);
-webkit-transform
:
translateX
(
-100%
);
transform
:
translateY
(
-100%
);
-webkit-transform
:
translateY
(
-100%
);
}
</
style
>
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