Skip to content
Open
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Views
The application's user interface consists of three main views:

* the [picture gallery](#picture-gallery) from which the user will be able to activate the [native camera view](#native-camera-view),
* the [native camera view](#native-camera-view) itslef, which is the native camera application of the device, launched through the [HTML Media Capture API][HTMLMEDIACAPTURE], and
* the [native camera view](#native-camera-view) itself, which is the native camera application of the device, launched through the [HTML Media Capture API][HTMLMEDIACAPTURE], and
* the [single picture view](#single-picture-view) which will notably allow applying filters.

The application will have a limited number of secondary views, e.g. for application settings.
Expand All @@ -45,7 +45,7 @@ Picture gallery

This view is the app's entry point. It displays all previously taken pictures in the form of an in-app scrollable gallery and offers a button to launch the [native camera](#native-camera-view). The button itself triggers a hidden (offscreen) `input[type=file][capture=camera]` element.

The gallery will be implemented as a infinite scroll component, pulling the pictures out of [IndexedDB][INDEXEDDB] on demand as notably [described and implemented](http://engineering.linkedin.com/linkedin-ipad-5-techniques-smooth-infinite-scrolling-html5) by Linkedin. This will be either handed-coded or will rely on an open-source library (e.g. [Airbnb Infinity](https://github.com/airbnb/infinity). It will enable stress-tesing scrolling performance and stuttering.
The gallery will be implemented as a infinite scroll component, pulling the pictures out of [IndexedDB][INDEXEDDB] on demand as notably [described and implemented](http://engineering.linkedin.com/linkedin-ipad-5-techniques-smooth-infinite-scrolling-html5) by Linkedin. This will be either handed-coded or will rely on an open-source library (e.g. [Airbnb Infinity](https://github.com/airbnb/infinity). It will enable stress-testing scrolling performance and stuttering.

This view will also enable selecting a number of pictures together (e.g. to upload to a remote servers, share, etc.) and switching to [single picture view mode](#single-picture-view).

Expand Down
3 changes: 0 additions & 3 deletions vanilla/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,6 @@ h2.label {
margin-top: -100px;
z-index: 10;
}
.evroneCropCanvas {
cursor: move;
}

/* Gallery Thumbnails */

Expand Down
2 changes: 1 addition & 1 deletion vanilla/css/swiper.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
-ms-backface-visibility:hidden;
-o-backface-visibility:hidden;
backface-visibility:hidden;
/* Fix of Webkit flickering */
/* Fix of WebKit flickering */
z-index:1;
}
.swiper-wrapper {
Expand Down
4 changes: 2 additions & 2 deletions vanilla/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name="msapplication-TileImage" content="images/icons/144x144.png">
<meta name="msapplication-TileColor" content="#bada55">

<!-- Home Screen icons for iOS, Android, Blackberry etc. -->
<!-- Home Screen icons for iOS, Android, BlackBerry, etc. -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="images/icons/144x144.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="images/icons/72x72.png">
<link rel="apple-touch-icon-precomposed" href="images/icons/57x57.png">
Expand Down Expand Up @@ -75,7 +75,7 @@ <h1>CoreMob Camera</h1>

<!-- Crop and Resize -->
<section id="photoCrop" hidden>
<div id="userPhotoCrontainer">
<div id="userPhotoContainer">
<img id="userPhoto" hidden/>
</div>
<div class="photoCropControls">
Expand Down
6 changes: 3 additions & 3 deletions vanilla/js/iDB.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var CoreMobCameraiDB = (function(){
var db;

// Supported without prefix: IE10
// Supported with Prefix: Chrome, Blackberry10 and Firefox Mobile 15
// Supported with Prefix: Chrome, BlackBerry10 and Firefox Mobile 15
// Unsupported: Opera Mobile, iOS6 Safari

window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB;
Expand Down Expand Up @@ -44,7 +44,7 @@ var CoreMobCameraiDB = (function(){
}

if(window.indexedDB === null) {
// possibly runnig the app from local file on older Firefox
// possibly running the app from local file on older Firefox
alert('IndexedDB cannot run locally on some browsers. Try running this app from a server.')
return;
}
Expand All @@ -55,7 +55,7 @@ var CoreMobCameraiDB = (function(){
db = e.target.result;
console.log(db);

// For Chrome < 23 (incl. mobile. v18) -- newer Chrome & FF deprecated it and use onupgradeneeded event
// For Chrome < 23 (including mobile. v18) -- newer Chrome & FF deprecated it and use onupgradeneeded event
if(typeof db.setVersion !== 'undefined') {
console.log('using the deprecated setVersion');
if(db.version != 1) {
Expand Down
12 changes: 6 additions & 6 deletions vanilla/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ var CoreMobCamera = (function() {

function renderFirstRun() {
showUI(firstRun);
var arrowHight = window.innerHeight * .5;
document.getElementsByClassName('arrow-container')[0].style.height = arrowHight + 'px';
var arrowHeight = window.innerHeight * .5;
document.getElementsByClassName('arrow-container')[0].style.height = arrowHeight + 'px';
}

function bindEvents() {
Expand Down Expand Up @@ -107,7 +107,7 @@ var CoreMobCamera = (function() {
// View a photo in carousel
document.getElementById('thumbnails').addEventListener('click', viewSinglePhoto, false);

// Temp - remove later and use the history api for the back button nav
// Temp - remove later and use the history API for the back button nav
document.getElementById('dismissSingleView').addEventListener('click', function(e){
showUI(sectionMain);
hideUI(sectionSingleView);
Expand All @@ -117,7 +117,7 @@ var CoreMobCamera = (function() {
document.getElementById('cropCancel').addEventListener('click', cancelCrop, false);
document.getElementById('cropApply').addEventListener('click', applyCrop, false);

// Uploading a photo -- not inplemented yet
// Uploading a photo -- not implemented yet
document.getElementById('uploadButton').addEventListener('click', function(){
//showUI(loader);
//startUpload();
Expand Down Expand Up @@ -393,9 +393,9 @@ var CoreMobCamera = (function() {
function fileSelected(capture) {

var localFile = document.getElementById(capture).files[0],
imgFmt = /^(image\/bmp|image\/gif|image\/jpeg|image\/png)$/i;
imgFormat = /^(image\/bmp|image\/gif|image\/jpeg|image\/png)$/i;

if (! imgFmt.test(localFile.type)) {
if (! imgFormat.test(localFile.type)) {
alert('The image format, ' + localFile.type + ' is not supported.');
hideUI(loader);
return;
Expand Down
8 changes: 4 additions & 4 deletions vanilla/js/photoFilter.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
Simple Photo Filters using Canvas
Referece: html5rocks.com/en/tutorials/canvas/imagefilters/
Reference: html5rocks.com/en/tutorials/canvas/imagefilters/
*/

var PhotoFilter = function(imgObj) {
Expand All @@ -18,7 +18,7 @@ var PhotoFilter = function(imgObj) {
var naturalImage = new Image();
naturalImage.src = this.imgObj.getAttribute('src');

// Get natural image dimension, rather than the displayed dimention.
// Get natural image dimension, rather than the displayed dimension.
this.c.width = naturalImage.width;
this.c.height = naturalImage.height;

Expand Down Expand Up @@ -113,7 +113,7 @@ PhotoFilter.prototype = {
var output = PhotoFilter.prototype.createImageData(w, h);
var dst = output.data;

var alphaFac = opaque ? 1 : 0;
var alphaFactor = opaque ? 1 : 0;

for (var y=0; y<h; y++) {
for (var x=0; x<w; x++) {
Expand All @@ -136,7 +136,7 @@ PhotoFilter.prototype = {
dst[dstOff] = r;
dst[dstOff+1] = g;
dst[dstOff+2] = b;
dst[dstOff+3] = a + alphaFac*(255-a);
dst[dstOff+3] = a + alphaFactor*(255-a);
}
}
return output;
Expand Down
12 changes: 6 additions & 6 deletions vanilla/js/swiper-1.7.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,10 +372,10 @@ Swiper = function(selector, params, callback) {
wrapper.addEventListener(_this.touchEvents.touchStart, onTouchStart, false);

//Mouse 'mousemove' and 'mouseup' events should be assigned to document
var lestenEl = (_this.support.touch) ? wrapper : document
var listenEl = (_this.support.touch) ? wrapper : document

lestenEl.addEventListener(_this.touchEvents.touchMove, onTouchMove, false);
lestenEl.addEventListener(_this.touchEvents.touchEnd, onTouchEnd, false);
listenEl.addEventListener(_this.touchEvents.touchMove, onTouchMove, false);
listenEl.addEventListener(_this.touchEvents.touchEnd, onTouchEnd, false);

//Remove Events
_this.destroy = function(removeResizeFix){
Expand All @@ -384,8 +384,8 @@ Swiper = function(selector, params, callback) {
window.removeEventListener(_this.resizeEvent, _this.resizeFix, false);
}
wrapper.removeEventListener(_this.touchEvents.touchStart, onTouchStart, true);
lestenEl.removeEventListener(_this.touchEvents.touchMove, onTouchMove, true);
lestenEl.removeEventListener(_this.touchEvents.touchEnd, onTouchEnd, true);
listenEl.removeEventListener(_this.touchEvents.touchMove, onTouchMove, true);
listenEl.removeEventListener(_this.touchEvents.touchEnd, onTouchEnd, true);
_this.callPlugins('onDestroy');
}
/*=========================
Expand Down Expand Up @@ -942,7 +942,7 @@ Swiper.prototype = {
if("MsPerspective" in div.style) s3d=true;
if("perspective" in div.style) s3d=true;

/* Test with Media query for Webkit to prevent FALSE positive*/
/* Test with Media query for WebKit to prevent FALSE positive*/
if(s3d && ("webkitPerspective" in div.style) ) {
var st = document.createElement('style');
st.textContent = '@media (-webkit-transform-3d), (transform-3d), (-moz-transform-3d), (-o-transform-3d), (-ms-transform-3d) {#test3d{height:5px}}'
Expand Down