Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
c90a4289
Unverified
Commit
c90a4289
authored
Jul 15, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: fixed pulse animation - double pulse issue
parent
465bebcd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
Frameworks/Motion
+1
-1
Material.xcodeproj/project.pbxproj
+0
-0
Sources/iOS/PulseAnimation.swift
+13
-14
No files found.
Motion
@
18169434
Subproject commit
a26c532b1146fc5012b47db271c2af849df73547
Subproject commit
1816943409577cabc9f4711272bc8fca16ac543b
Material.xcodeproj/project.pbxproj
View file @
c90a4289
This diff is collapsed.
Click to expand it.
Sources/iOS/PulseAnimation.swift
View file @
c90a4289
...
...
@@ -128,7 +128,7 @@ public struct Pulse {
]
in
bLayer
.
frame
=
bounds
pLayer
.
bounds
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
n
,
height
:
n
)
pLayer
.
frame
=
CGRect
(
x
:
0
,
y
:
0
,
width
:
n
,
height
:
n
)
switch
animation
{
case
.
center
,
.
centerWithBacking
,
.
centerRadialBeyondBounds
:
...
...
@@ -146,15 +146,15 @@ public struct Pulse {
let
t
:
TimeInterval
=
.
center
==
animation
?
0.16125
:
0.325
//
switch animation {
//
case .centerWithBacking, .backing, .pointWithBacking:
// bLayer.animate(
.duration(t))
//
default:break
//
}
switch
animation
{
case
.
centerWithBacking
,
.
backing
,
.
pointWithBacking
:
bLayer
.
animate
(
.
background
(
color
:
color
.
withAlphaComponent
(
opacity
/
2
)),
.
duration
(
t
))
default
:
break
}
switch
animation
{
case
.
center
,
.
centerWithBacking
,
.
centerRadialBeyondBounds
,
.
radialBeyondBounds
,
.
point
,
.
pointWithBacking
:
pLayer
.
animate
(
.
scale
(
),
.
background
(
color
:
color
.
withAlphaComponent
(
opacity
/
2
)
),
.
duration
(
t
))
pLayer
.
animate
(
.
scale
(
1
),
.
duration
(
t
))
default
:
break
}
...
...
@@ -180,16 +180,15 @@ public struct Pulse {
let
t
:
TimeInterval
=
0.325
//
switch animation {
//
case .centerWithBacking, .backing, .pointWithBacking:
//
bLayer.animate(.background(color: color.withAlphaComponent(0)), .duration(t))
//
default:break
//
}
switch
animation
{
case
.
centerWithBacking
,
.
backing
,
.
pointWithBacking
:
bLayer
.
animate
(
.
background
(
color
:
color
.
withAlphaComponent
(
0
)),
.
duration
(
t
))
default
:
break
}
switch
animation
{
case
.
center
,
.
centerWithBacking
,
.
centerRadialBeyondBounds
,
.
radialBeyondBounds
,
.
point
,
.
pointWithBacking
:
let
v
:
CGFloat
=
.
center
==
animation
?
1
:
1.325
pLayer
.
animate
(
.
scale
(
x
:
v
,
y
:
v
,
z
:
v
),
.
background
(
color
:
color
.
withAlphaComponent
(
0
)))
pLayer
.
animate
(
.
background
(
color
:
color
.
withAlphaComponent
(
0
)))
default
:
break
}
...
...
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