Skip to content

Commit fb8251e

Browse files
committed
cvb
1 parent cfb24d4 commit fb8251e

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

dist/index.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,10 @@ var Navigator = function (_React$Component) {
7171
startPage: startPage,
7272
mobileMode: mobileMode,
7373
swipeRight_x: 0,
74+
<<<<<<< HEAD
7475
swipeRightStart_x: 0,
76+
=======
77+
>>>>>>> parent of 6a76068... @0.0.1
7578
props: []
7679
};
7780

@@ -331,6 +334,10 @@ var Navigator = function (_React$Component) {
331334
value: function render() {
332335
var _this4 = this;
333336

337+
<<<<<<< HEAD
338+
=======
339+
// debugger
340+
>>>>>>> parent of 6a76068... @0.0.1
334341
var fthis = this;
335342
// window.navigation_controller = this;
336343
var nowPage = this.state.historyPages[this.state.historyPages.length - 1];
@@ -353,6 +360,7 @@ var Navigator = function (_React$Component) {
353360
return _react2.default.createElement(
354361
'div',
355362
{
363+
<<<<<<< HEAD
356364
// onTouchStart={(e) => {
357365

358366

@@ -365,6 +373,14 @@ var Navigator = function (_React$Component) {
365373
fthis.touchBackPage = nowPage;
366374
fthis.swipeRight = true;
367375
fthis.setState({ swipeRightStart_x: e.touches[0].clientX });
376+
=======
377+
onTouchStart: function onTouchStart(e) {
378+
if (child.props.backOnSwipeRight) {
379+
if (e.touches[0].clientX < 0.20 * innerWidth) {
380+
fthis.touchBackPage = nowPage;
381+
fthis.swipeRight = true;
382+
fthis.setState({ swipeRight_x: e.touches[0].clientX });
383+
>>>>>>> parent of 6a76068... @0.0.1
368384

369385
var goToPage = _this4.state.historyPages[_this4.state.historyPages.length - 2];
370386

@@ -374,8 +390,15 @@ var Navigator = function (_React$Component) {
374390
(0, _jquery2.default)('#' + goToPage).addClass('showPage overflow_Y_hidden');
375391
}
376392
}
393+
<<<<<<< HEAD
377394
if (fthis.swipeRight) {
378395
fthis.setState({ swipeRight_x: e.touches[0].clientX - fthis.state.swipeRightStart_x <= 0 ? 1 : e.touches[0].clientX - fthis.state.swipeRightStart_x });
396+
=======
397+
},
398+
onTouchMove: function onTouchMove(e) {
399+
if (fthis.swipeRight) {
400+
fthis.setState({ swipeRight_x: e.touches[0].clientX });
401+
>>>>>>> parent of 6a76068... @0.0.1
379402
}
380403
},
381404
onTouchEnd: function onTouchEnd(e) {

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"name": "react.cordova-navigation_controller",
3+
<<<<<<< HEAD
34
"version": "1.6.4",
5+
=======
6+
"version": "1.6.3",
7+
>>>>>>> parent of 6a76068... @0.0.1
48
"description": "Navigator for Cordova with React.js(react.cordova), This will help you to manage your pages history in the app and change pages with animation.",
59
"main": "dist/index.js",
610
"scripts": {

src/index.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ export default class Navigator extends React.Component {
5858
startPage: startPage,
5959
mobileMode: mobileMode,
6060
swipeRight_x: 0,
61+
<<<<<<< HEAD
6162
swipeRightStart_x: 0,
63+
=======
64+
>>>>>>> parent of 6a76068... @0.0.1
6265
props: []
6366
}
6467

@@ -339,7 +342,11 @@ export default class Navigator extends React.Component {
339342
}
340343

341344
render() {
345+
<<<<<<< HEAD
342346

347+
=======
348+
// debugger
349+
>>>>>>> parent of 6a76068... @0.0.1
343350
const fthis = this;
344351
// window.navigation_controller = this;
345352
const nowPage = this.state.historyPages[this.state.historyPages.length - 1];
@@ -362,6 +369,7 @@ export default class Navigator extends React.Component {
362369
return Array.isArray(this.props.children)
363370
? this.props.children.map(child => {
364371
return <div
372+
<<<<<<< HEAD
365373
// onTouchStart={(e) => {
366374

367375

@@ -374,6 +382,14 @@ export default class Navigator extends React.Component {
374382
fthis.touchBackPage = nowPage;
375383
fthis.swipeRight = true;
376384
fthis.setState({ swipeRightStart_x: e.touches[0].clientX });
385+
=======
386+
onTouchStart={(e) => {
387+
if (child.props.backOnSwipeRight) {
388+
if (e.touches[0].clientX < (0.20 * innerWidth)) {
389+
fthis.touchBackPage = nowPage;
390+
fthis.swipeRight = true;
391+
fthis.setState({ swipeRight_x: e.touches[0].clientX });
392+
>>>>>>> parent of 6a76068... @0.0.1
377393

378394
const goToPage = this.state.historyPages[this.state.historyPages.length - 2];
379395

@@ -384,8 +400,15 @@ export default class Navigator extends React.Component {
384400
}
385401

386402
}
403+
<<<<<<< HEAD
387404
if (fthis.swipeRight) {
388405
fthis.setState({ swipeRight_x: (e.touches[0].clientX - fthis.state.swipeRightStart_x) <= 0 ? 1 : e.touches[0].clientX - fthis.state.swipeRightStart_x });
406+
=======
407+
}}
408+
onTouchMove={(e) => {
409+
if (fthis.swipeRight) {
410+
fthis.setState({ swipeRight_x: e.touches[0].clientX });
411+
>>>>>>> parent of 6a76068... @0.0.1
389412
}
390413
}}
391414
onTouchEnd={(e) => {

0 commit comments

Comments
 (0)