Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
YM4-13
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
YM4-13
Commits
ed421e7b
Commit
ed421e7b
authored
Oct 11, 2020
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix
parent
43228064
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
14 deletions
+4
-14
Unit.ts
src/app/common/custom-hot-zone/Unit.ts
+3
-7
custom-hot-zone.component.html
...app/common/custom-hot-zone/custom-hot-zone.component.html
+1
-1
custom-hot-zone.component.ts
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
+0
-6
No files found.
src/app/common/custom-hot-zone/Unit.ts
View file @
ed421e7b
...
@@ -469,13 +469,9 @@ export class HotZoneImageItem extends MySprite {
...
@@ -469,13 +469,9 @@ export class HotZoneImageItem extends MySprite {
defSize
=
s
defSize
=
s
}
}
}
}
if
(
type
==
"
Text
"
){
this
.
scaleX
=
defSize
.
width
/
img
.
width
this
.
setSize
(
img
.
width
*
this
.
image
.
scaleX
,
img
.
height
*
this
.
image
.
scaleY
)
this
.
scaleY
=
defSize
.
height
/
img
.
height
this
.
setSize
(
img
.
width
*
this
.
scaleX
,
img
.
height
*
this
.
scaleY
)
}
else
{
this
.
setSize
(
img
.
width
*
this
.
image
.
scaleX
,
img
.
height
*
this
.
image
.
scaleY
)
}
handleSave
&&
handleSave
()
handleSave
&&
handleSave
()
this
.
lineDashFlag
=
true
;
this
.
lineDashFlag
=
true
;
if
(
type
==
"
Text
"
){
if
(
type
==
"
Text
"
){
...
...
src/app/common/custom-hot-zone/custom-hot-zone.component.html
View file @
ed421e7b
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
Save
Save
</button>
</button>
</div>
</div>
<h5
*
ngIf=
"customBackground"
style=
"border-top: 2px solid #ddd;"
>
背景
图:
</h5>
<h5
*
ngIf=
"customBackground"
style=
"border-top: 2px solid #ddd;"
>
选区字母
图:
</h5>
<div
*
ngIf=
"customBackground"
style=
"width: 200px; margin: auto;"
>
<div
*
ngIf=
"customBackground"
style=
"width: 200px; margin: auto;"
>
<div
class=
"bg-box"
>
<div
class=
"bg-box"
>
<app-upload-image-with-preview
[
picUrl
]="
bgItem
.
url
"
(
imageUploaded
)="
onBackgroundUploadSuccess
($
event
)"
>
<app-upload-image-with-preview
[
picUrl
]="
bgItem
.
url
"
(
imageUploaded
)="
onBackgroundUploadSuccess
($
event
)"
>
...
...
src/app/common/custom-hot-zone/custom-hot-zone.component.ts
View file @
ed421e7b
...
@@ -194,9 +194,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
...
@@ -194,9 +194,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
item
.
scaleY
=
(
saveData
.
rect
.
height
/
saveData
.
scale
)
/
h
;
item
.
scaleY
=
(
saveData
.
rect
.
height
/
saveData
.
scale
)
/
h
;
item
.
x
=
saveRect
.
x
/
saveData
.
scale
+
newRect
.
x
item
.
x
=
saveRect
.
x
/
saveData
.
scale
+
newRect
.
x
item
.
y
=
saveRect
.
y
/
saveData
.
scale
+
newRect
.
y
item
.
y
=
saveRect
.
y
/
saveData
.
scale
+
newRect
.
y
if
(
saveData
.
media
.
type
==
"
Text
"
)
{
return
{
width
:
this
.
itemWidth
,
height
:
this
.
itemHeight
}
}
});
});
item
.
uid
=
saveData
.
uid
item
.
uid
=
saveData
.
uid
item
.
image_url
=
saveData
.
media
.
image_url
item
.
image_url
=
saveData
.
media
.
image_url
...
@@ -209,12 +206,10 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
...
@@ -209,12 +206,10 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
item
.
init
(
this
.
defaultItemBG
,
"
Text
"
,
"
Text
"
,
()
=>
{
item
.
init
(
this
.
defaultItemBG
,
"
Text
"
,
"
Text
"
,
()
=>
{
item
.
x
=
this
.
canvasWidth
/
2
-
this
.
itemWidth
/
2
;
item
.
x
=
this
.
canvasWidth
/
2
-
this
.
itemWidth
/
2
;
item
.
y
=
this
.
canvasHeight
/
2
-
20
;
item
.
y
=
this
.
canvasHeight
/
2
-
20
;
return
{
width
:
this
.
itemWidth
,
height
:
this
.
itemHeight
}
},
()
=>
this
.
autoSave
());
},
()
=>
this
.
autoSave
());
}
}
item
.
anchorX
=
0.5
;
item
.
anchorX
=
0.5
;
item
.
anchorY
=
0.5
;
item
.
anchorY
=
0.5
;
return
item
;
return
item
;
}
}
...
@@ -635,7 +630,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
...
@@ -635,7 +630,6 @@ export class CustomHotZoneComponent implements OnInit, OnDestroy {
hotZoneItem
[
'
media
'
].
text
=
hotZoneArr
[
i
].
text
hotZoneItem
[
'
media
'
].
text
=
hotZoneArr
[
i
].
text
hotZoneItem
[
'
media
'
].
type
=
hotZoneArr
[
i
].
type
hotZoneItem
[
'
media
'
].
type
=
hotZoneArr
[
i
].
type
hotZoneItem
[
'
media
'
].
audio_url
=
hotZoneArr
[
i
].
audio_url
?
hotZoneArr
[
i
].
audio_url
:
""
hotZoneItem
[
'
media
'
].
audio_url
=
hotZoneArr
[
i
].
audio_url
?
hotZoneArr
[
i
].
audio_url
:
""
// hotZoneItem['media'].card_audio_url = hotZoneArr[i].card_audio_url ? hotZoneArr[i].card_audio_url : ""
hotZoneItemArr
.
push
(
hotZoneItem
);
hotZoneItemArr
.
push
(
hotZoneItem
);
}
}
this
.
save
.
emit
({
bgItem
,
hotZoneItemArr
});
this
.
save
.
emit
({
bgItem
,
hotZoneItemArr
});
...
...
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