New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TIMOB-25684] iOS: Adds home-screen like parallax effect to views #9748
Conversation
The unit-tests are missing which will prevent our Danger.js checks from passing. I prepared them for you, please create a file /*
* Appcelerator Titanium Mobile
* Copyright (c) 2015-Present by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
/* eslint-env mocha */
/* global Ti */
/* eslint no-unused-expressions: "off" */
'use strict';
var should = require('./utilities/assertions');
describe('Titanium.UI.View', function() {
it.ios('.horizontalMotionEffect, .verticalMotionEffect', function(finish) {
var win = Ti.UI.createWindow({
backgroundColor: 'blue'
});
var view = Ti.UI.createView({
horizontalMotionEffect: {
min: -50,
max: 50
},
verticalMotionEffect: {
min: -50,
max: 50
}
});
win.addEventListener('open', function() {
// horizontalMotionEffect
should(view.horizontalMotionEffect).be.an.Object;
should(view.horizontalMotionEffect.min).be.a.Number;
should(view.horizontalMotionEffect.max).be.a.Number;
// verticalMotionEffect
should(view.verticalMotionEffect).be.an.Object;
should(view.verticalMotionEffect.min).be.a.Number;
should(view.verticalMotionEffect.max).be.a.Number;
finish();
});
win.add(view);
win.open();
});
}); Also, please adjust the docs in EDIT: @chmiiller I've update the test-case to actually call |
Thanks @hansemannn ! I've just updated tests and added the properties into View's documentation. Is it missing something else? |
|
Generated by 🚫 dangerJS |
Thanks for all the work @hansemannn ! Looking forward to see it on 7.1.0 release 😬 |
JIRA: https://jira.appcelerator.org/browse/TIMOB-25684
Adds homescreen like parallax effect to views based on Marcel Pociot's module https://github.com/mpociot/TiMotionEffects