Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions source/circle.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ const Circle = memo(({ color, normalColor, fill, x, y, r, inner, outer }) => {
const _styleIner = useMemo(
() => [
!outer && styles.inner,
{ width: (2 * r) / 3, height: (2 * r) / 3, borderRadius: r / 3 },
fill && { backgroundColor: color },
{
width: (2 * r) / 3,
height: (2 * r) / 3,
borderRadius: r / 3,
backgroundColor: fill ? color : "transparent",
},
],
[r, outer, fill, color],
);
Expand Down
8 changes: 4 additions & 4 deletions source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default class GesturePassword extends Component {
? e.nativeEvent.pageX
: e.nativeEvent.pageX - Width / 3.4;
let y = isVertical
? e.nativeEvent.pageY - Top / 1.25
? e.nativeEvent.pageY - Top / 1.5
: e.nativeEvent.pageY - 30;

let lastChar = this.getTouchChar({ x, y });
Expand Down Expand Up @@ -207,7 +207,7 @@ export default class GesturePassword extends Component {
? e.nativeEvent.pageX
: e.nativeEvent.pageX - Width / 3.4;
let y = isVertical
? e.nativeEvent.pageY - Top / 1.25
? e.nativeEvent.pageY - Top / 1.5
: e.nativeEvent.pageY - 30;

this.refs.line.setNativeProps({ end: { x, y } });
Expand Down Expand Up @@ -352,7 +352,7 @@ const Lines = memo(
({ lines, status, wrongColor, rightColor, transparentLine }) => {
let color;

return lines.map(function(l, i) {
return lines.map(function (l, i) {
color = status === "wrong" ? wrongColor : rightColor;
color = transparentLine ? "#00000000" : color;

Expand All @@ -373,7 +373,7 @@ const Circles = memo(
}) => {
let fill, color, inner, outer;

return circles.map(function(c, i) {
return circles.map(function (c, i) {
fill = c.isActive;
color = status === "wrong" ? wrongColor : rightColor;
inner = !!innerCircle;
Expand Down