Skip to content

Commit caa241c

Browse files
committed
fix for #13, wrong height with center_vertical gravity
1 parent e76ae34 commit caa241c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Diff for: LeonidasLib/src/com/plattysoft/leonids/ParticleSystem.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@ public ParticleSystem(Activity a, int maxParticles, AnimationDrawable animation,
159159
* Adds a modifier to the Particle system, it will be executed on each update.
160160
*
161161
* @param modifier
162-
* @return
163162
*/
164163
public ParticleSystem addModifier(ParticleModifier modifier) {
165164
mModifiers.add(modifier);
@@ -226,7 +225,7 @@ public ParticleSystem setStartTime(int time) {
226225
/**
227226
* Configures a fade out for the particles when they disappear
228227
*
229-
* @param duration fade out duration in miliseconds
228+
* @param milisecondsBeforeEnd fade out duration in miliseconds
230229
* @param interpolator the interpolator for the fade out (default is linear)
231230
*/
232231
public ParticleSystem setFadeOut(long milisecondsBeforeEnd, Interpolator interpolator) {
@@ -250,7 +249,6 @@ public ParticleSystem setFadeOut(long duration) {
250249
* @param emiter View from which center the particles will be emited
251250
* @param gravity Which position among the view the emission takes place
252251
* @param particlesPerSecond Number of particles per second that will be emited (evenly distributed)
253-
* @param timeToLive miliseconds the particles will be displayed
254252
* @param emitingTime time the emiter will be emiting particles
255253
*/
256254
public void emitWithGravity (View emiter, int gravity, int particlesPerSecond, int emitingTime) {
@@ -265,7 +263,6 @@ public void emitWithGravity (View emiter, int gravity, int particlesPerSecond, i
265263
*
266264
* @param emiter View from which center the particles will be emited
267265
* @param particlesPerSecond Number of particles per second that will be emited (evenly distributed)
268-
* @param timeToLive miliseconds the particles will be displayed
269266
* @param emitingTime time the emiter will be emiting particles
270267
*/
271268
public void emit (View emiter, int particlesPerSecond, int emitingTime) {
@@ -457,7 +454,7 @@ else if (hasGravity(gravity, Gravity.CENTER_VERTICAL)){
457454
else {
458455
// All the range
459456
mEmiterYMin = location[1] - mParentLocation[1];
460-
mEmiterYMax = location[1] + emiter.getWidth() - mParentLocation[1];
457+
mEmiterYMax = location[1] + emiter.getHeight() - mParentLocation[1];
461458
}
462459
}
463460

0 commit comments

Comments
 (0)