Skip to content

Commit 7ed7aa8

Browse files
committed
fix rotate captcha
1 parent 65dc617 commit 7ed7aa8

File tree

16 files changed

+49
-16
lines changed

16 files changed

+49
-16
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div align="center">
22
<img width="120" style="padding-top: 50px; margin: 0;" src="http://47.104.180.148/go-captcha/gocaptcha_logo.svg?v=1"/>
33
<h1 style="margin: 0; padding: 0">Go Captcha</h1>
4-
<p>Behavior Captcha For Angular</p>
4+
<p>The Behavior Captcha For The Angular</p>
55

66
</div>
77

@@ -292,6 +292,7 @@ interface RotateData {
292292
angle: number;
293293
image: string;
294294
thumb: string;
295+
thumbSize: number;
295296
}
296297

297298
// events = {}

README_zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ interface RotateData {
293293
angle: number;
294294
image: string;
295295
thumb: string;
296+
thumbSize: number;
296297
}
297298

298299
// events = {}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "go-captcha-angular",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "GoCaptcha for Angular, which implements click mode, slider mode, drag-drop mode and rotation mode.",
55
"private": false,
66
"email": "wengaolng@gmail.com",

projects/example/src/app/app.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ export class AppComponent {
207207

208208
////////////////////////////////
209209
rotateData = {
210-
angle: 20,
211210
image: this.rotateImage,
212211
thumb: this.rotateThumb,
212+
thumbSize: 195
213213
}
214214

215215
rotateEvents = {
@@ -221,7 +221,6 @@ export class AppComponent {
221221
...this.rotateData,
222222
image: this.clickImage2,
223223
thumb: this.rotateThumb,
224-
angle: 40,
225224
}
226225
console.log("refresh >>>>>>>")
227226
},

projects/go-captcha-angular/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div align="center">
22
<img width="120" style="padding-top: 50px; margin: 0;" src="http://47.104.180.148/go-captcha/gocaptcha_logo.svg?v=1"/>
33
<h1 style="margin: 0; padding: 0">Go Captcha</h1>
4-
<p>Behavior Captcha For Angular</p>
4+
<p>The Behavior Captcha For The Angular</p>
55

66
</div>
77

@@ -292,6 +292,7 @@ interface RotateData {
292292
angle: number;
293293
image: string;
294294
thumb: string;
295+
thumbSize: number;
295296
}
296297

297298
// events = {}

projects/go-captcha-angular/README_zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ interface RotateData {
293293
angle: number;
294294
image: string;
295295
thumb: string;
296+
thumbSize: number;
296297
}
297298

298299
// events = {}

projects/go-captcha-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "go-captcha-angular",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"license": "MIT",
55
"description": "GoCaptcha for Angular, which implements click mode, slider mode, drag-drop mode and rotation mode.",
66
"keywords": [

projects/go-captcha-angular/src/lib/modules/click/click.component.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414
z-index: 2;
1515
width: 22px;
1616
height: 22px;
17-
color: #cedffe;
18-
background: #3e7cff;
17+
color: var(--go-captcha-theme-dot-color);
18+
background: var(--go-captcha-theme-dot-bg-color);
1919
border: 3px solid #f7f9fb;
20+
border-color: var(--go-captcha-theme-dot-border-color);
2021
display:-webkit-box;
2122
display:-webkit-flex;
2223
display:-ms-flexbox;

projects/go-captcha-angular/src/lib/modules/click/click.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class ClickComponent {
3838
}
3939

4040
get hasDisplayImageState() {
41-
return this.localData.image != '' || this.localData.thumb != ''
41+
return (this.localData.image && this.localData.image.length > 0) || (this.localData.thumb && this.localData.thumb.length > 0)
4242
}
4343

4444
clickEvent(e: Event|any){

projects/go-captcha-angular/src/lib/modules/rotate/rotate-instance.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,17 @@ export const defaultRotateConfig = ():RotateConfig => ({
3030
})
3131

3232
export interface RotateData {
33-
angle: number;
33+
angle?: number;
3434
image: string;
3535
thumb: string;
36+
thumbSize?: number;
3637
}
3738

3839
export const defaultRotateData = (): RotateData =>({
3940
angle: 0,
4041
image: '',
41-
thumb: ''
42+
thumb: '',
43+
thumbSize: 0
4244
})
4345

4446

0 commit comments

Comments
 (0)