update portrait layout calculator-react

This commit is contained in:
trent committed 2020-06-14 21:07:32 -07:00
1 parent 3c69f04e28
commit 0141162d14
8 files changed
+14 -13

No files matched your search

+4 -4
View File
@@ -1,14 +1,14 @@
{ {
"files": { "files": {
"main.css": "/fcc-challenges/calculator-react/build/static/css/main.1b8ac635.chunk.css", "main.css": "/fcc-challenges/calculator-react/build/static/css/main.1b8ac635.chunk.css",
"main.js": "/fcc-challenges/calculator-react/build/static/js/main.bfd616ae.chunk.js", "main.js": "/fcc-challenges/calculator-react/build/static/js/main.78f555dc.chunk.js",
"main.js.map": "/fcc-challenges/calculator-react/build/static/js/main.bfd616ae.chunk.js.map", "main.js.map": "/fcc-challenges/calculator-react/build/static/js/main.78f555dc.chunk.js.map",
"runtime-main.js": "/fcc-challenges/calculator-react/build/static/js/runtime-main.bf967002.js", "runtime-main.js": "/fcc-challenges/calculator-react/build/static/js/runtime-main.bf967002.js",
"runtime-main.js.map": "/fcc-challenges/calculator-react/build/static/js/runtime-main.bf967002.js.map", "runtime-main.js.map": "/fcc-challenges/calculator-react/build/static/js/runtime-main.bf967002.js.map",
"static/js/2.07dbc1f4.chunk.js": "/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js", "static/js/2.07dbc1f4.chunk.js": "/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js",
"static/js/2.07dbc1f4.chunk.js.map": "/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js.map", "static/js/2.07dbc1f4.chunk.js.map": "/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js.map",
"index.html": "/fcc-challenges/calculator-react/build/index.html", "index.html": "/fcc-challenges/calculator-react/build/index.html",
"precache-manifest.25ea6938318dfa689cefd0b87f019a55.js": "/fcc-challenges/calculator-react/build/precache-manifest.25ea6938318dfa689cefd0b87f019a55.js", "precache-manifest.15081527d8e72b36055d35a84948c07f.js": "/fcc-challenges/calculator-react/build/precache-manifest.15081527d8e72b36055d35a84948c07f.js",
"service-worker.js": "/fcc-challenges/calculator-react/build/service-worker.js", "service-worker.js": "/fcc-challenges/calculator-react/build/service-worker.js",
"static/css/main.1b8ac635.chunk.css.map": "/fcc-challenges/calculator-react/build/static/css/main.1b8ac635.chunk.css.map", "static/css/main.1b8ac635.chunk.css.map": "/fcc-challenges/calculator-react/build/static/css/main.1b8ac635.chunk.css.map",
"static/js/2.07dbc1f4.chunk.js.LICENSE.txt": "/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js.LICENSE.txt" "static/js/2.07dbc1f4.chunk.js.LICENSE.txt": "/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js.LICENSE.txt"
@@ -17,6 +17,6 @@
"static/js/runtime-main.bf967002.js", "static/js/runtime-main.bf967002.js",
"static/js/2.07dbc1f4.chunk.js", "static/js/2.07dbc1f4.chunk.js",
"static/css/main.1b8ac635.chunk.css", "static/css/main.1b8ac635.chunk.css",
"static/js/main.bfd616ae.chunk.js" "static/js/main.78f555dc.chunk.js"
] ]
} }
+1 -1
View File
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="#"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/fcc-challenges/calculator-react/build/logo192.png"/><link rel="manifest" href="/fcc-challenges/calculator-react/build/manifest.json"/><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Baloo+Bhai"/><title>Calculator React - Build a Calculator - Front End Libraries Projects</title><link href="/fcc-challenges/calculator-react/build/static/css/main.1b8ac635.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div><script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script></div></div><script>!function(e){function r(r){for(var n,l,a=r[0],c=r[1],f=r[2],p=0,s=[];p<a.length;p++)l=a[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(i&&i(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var c=t[a];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/fcc-challenges/calculator-react/build/";var a=this["webpackJsonpcalculator-react"]=this["webpackJsonpcalculator-react"]||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var f=0;f<a.length;f++)r(a[f]);var i=c;t()}([])</script><script src="/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js"></script><script src="/fcc-challenges/calculator-react/build/static/js/main.bfd616ae.chunk.js"></script></body></html> <!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="#"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/fcc-challenges/calculator-react/build/logo192.png"/><link rel="manifest" href="/fcc-challenges/calculator-react/build/manifest.json"/><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Baloo+Bhai"/><title>Calculator React - Build a Calculator - Front End Libraries Projects</title><link href="/fcc-challenges/calculator-react/build/static/css/main.1b8ac635.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div><script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script></div></div><script>!function(e){function r(r){for(var n,l,a=r[0],c=r[1],f=r[2],p=0,s=[];p<a.length;p++)l=a[p],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(i&&i(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++){var c=t[a];0!==o[c]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/fcc-challenges/calculator-react/build/";var a=this["webpackJsonpcalculator-react"]=this["webpackJsonpcalculator-react"]||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var f=0;f<a.length;f++)r(a[f]);var i=c;t()}([])</script><script src="/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js"></script><script src="/fcc-challenges/calculator-react/build/static/js/main.78f555dc.chunk.js"></script></body></html>
@@ -1,10 +1,10 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([ self.__precacheManifest = (self.__precacheManifest || []).concat([
{ {
"revision": "60a2129b30b27571f044270be4d55f27", "revision": "bf28c05700c228dd6c17f7d3554f32be",
"url": "/fcc-challenges/calculator-react/build/index.html" "url": "/fcc-challenges/calculator-react/build/index.html"
}, },
{ {
"revision": "2ad96291c59025fc4b09", "revision": "9081a437021193343ab2",
"url": "/fcc-challenges/calculator-react/build/static/css/main.1b8ac635.chunk.css" "url": "/fcc-challenges/calculator-react/build/static/css/main.1b8ac635.chunk.css"
}, },
{ {
@@ -16,8 +16,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js.LICENSE.txt" "url": "/fcc-challenges/calculator-react/build/static/js/2.07dbc1f4.chunk.js.LICENSE.txt"
}, },
{ {
"revision": "2ad96291c59025fc4b09", "revision": "9081a437021193343ab2",
"url": "/fcc-challenges/calculator-react/build/static/js/main.bfd616ae.chunk.js" "url": "/fcc-challenges/calculator-react/build/static/js/main.78f555dc.chunk.js"
}, },
{ {
"revision": "11fa019406a5ca9e472e", "revision": "11fa019406a5ca9e472e",
+1 -1
View File
@@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js"); importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");
importScripts( importScripts(
"/fcc-challenges/calculator-react/build/precache-manifest.25ea6938318dfa689cefd0b87f019a55.js" "/fcc-challenges/calculator-react/build/precache-manifest.15081527d8e72b36055d35a84948c07f.js"
); );
self.addEventListener('message', (event) => { self.addEventListener('message', (event) => {
@@ -1,2 +1,2 @@
(this["webpackJsonpcalculator-react"]=this["webpackJsonpcalculator-react"]||[]).push([[0],{24:function(t,n,e){t.exports=e(37)},33:function(t,n,e){},37:function(t,n,e){"use strict";e.r(n);var o=e(0),i=e.n(o),r=e(16),a=e.n(r),u=e(2),c=e(13),s=function(t){return{type:"SETINPUTSTRING",inputString:t}},l=function(t){return{type:"SETOPERATIONSTRING",operationString:t}},d=Object(c.b)({innerWindowWidth:function(t,n){switch(t||(t=window.innerWidth),n.type){case"SETWINDOWINNERWIDTH":return n.windowInnerWidth;default:return t}},innerWindowHeight:function(t,n){switch(t||(t=window.innerHeight),n.type){case"SETWINDOWINNERHEIGHT":return n.windowInnerHeight;default:return t}},inputString:function(t,n){switch(t||(t=""),n.type){case"SETINPUTSTRING":return n.inputString;default:return t}},operationString:function(t,n){switch(t||(t=""),n.type){case"SETOPERATIONSTRING":return n.operationString;default:return t}}}),h=Object(c.c)(d),p=(e(33),e(3)),g=e(4),b=e(1),f=e(6),v=e(5),k=e(7),C=e(8),S=e(12),m="#00293C",E="#1e656d",y="#6d261e",j="#656d1e",O="#261e6d",w="#f1f3ce",M="#f62a00",R=["*","/","-","+"],W=function(t,n,e){var o=t,i=n.includes("=")?n.split("=")[1]:n,r=i;i.length>0&&["*","/","+","-","="].includes(e)&&"."===i.slice(-1)&&(i=i.slice(0,-1));if(["1","2","3","4","5","6","7","8","9"].includes(e))0===t.length?(o=e,r=i+e):1===t.length?"0"===t[0]?(o=e,r=i.slice(0,-1)+e):"-"===t[0]?1===i.length?(o=t+e,r=t+e):(o=t+e,r=i+e):["*","/","+"].includes(t[0])?(o=e,r=i+e):(o=t+e,r=i+e):2===t.length?"-"===t[0]&&"0"===t[1]?(o="-"+e,r=i.slice(0,-1)+e):(o=t+e,r=i+e):t.length>2&&(o=t+e,r=i+e);else if("0"===e)0===t.length?(o=e,r=i+e):1===t.length?"0"!==t[0]&&(["*","/","+"].includes(t[0])?(o=e,r=i+e):(o=t+e,r=i+e)):2===t.length?("-"!==t[0]||"0"!==t[1])&&(o=t+e,r=i+e):t.length>2&&(o=t+e,r=i+e);else if("-"===e)0===i.length?(o=e,r=e):1===i.length&&R.includes(i[0])||(o=e,r=i+e);else if(["*","/","+"].includes(e))1===i.length?R.includes(i.slice(-1))||(r=i+e,o=e):i.length>1&&(o=e,r=i+e);else if("."!==e||t.includes("."))if("="===e&&i.length>0){var a=i.slice(-1);R.includes(a)||"."===a?(o=x(i.slice(0,-1)),r=i.slice(0,-1)+"="+o):r=i+"="+(o=x(i))}else"b"===e&&(1===i.length?(o=t.slice(0,-1),r=i.slice(0,-1)):i.length>1&&(R.includes(i.slice(-1))?R.includes(i.slice(-2,-1))?(o=i.slice(-2,-1),r=i.slice(0,-1)):o=(r=i.slice(0,-1)).split(/[-*/+]/).slice(-1)[0]:R.includes(i.slice(-2,-1))?(o=i.slice(-2,-1),r=i.slice(0,-1)):(o=t.slice(0,-1),r=i.slice(0,-1))));else 0===t.length?(o="0.",r=i+"0."):1===t.length?0===i.length?"-"===t[0]?(o="-0.",r=i+"-0."):(o=t+e,r=i+e):R.includes(t[0])?(o="0.",r=i+"0."):(o=t+e,r=i+e):(o=t+e,r=i+e);return[o,r]},x=function(t){var n=[];for(t.split("").forEach((function(t,e){if(0===e)n.push(t);else if(R.includes(t))n.push(t);else if("-"===n[n.length-1])if(1===e||R.includes(n[n.length-2])){var o=n[n.length-1];n[n.length-1]=o+t}else n.push(t);else if(["*","/","+"].includes(n[n.length-1]))n.push(t);else{var i=n[n.length-1];n[n.length-1]=i+t}}));R.includes(n[n.length-1]);)n.pop();var e=n.filter((function(t,e){return!R.includes(n[e+1])||!R.includes(t)}));return 1===e.length?e[0]:A(e.map((function(t){return R.includes(t)?t:t.includes(".")?parseFloat(t):parseInt(t)})))[0].toString()},A=function t(n){if(1===n.length)return n;if(n.includes("*")){var e=n.indexOf("*");return t([].concat(Object(S.a)(n.slice(0,e-1)),[n[e-1]*n[e+1]],Object(S.a)(n.slice(e+2))))}if(n.includes("/")){var o=n.indexOf("/");return t([].concat(Object(S.a)(n.slice(0,o-1)),[n[o-1]/n[o+1]],Object(S.a)(n.slice(o+2))))}if(n.includes("-")){var i=n.indexOf("-");return t([].concat(Object(S.a)(n.slice(0,i-1)),[n[i-1]-n[i+1]],Object(S.a)(n.slice(i+2))))}if(n.includes("+")){var r=n.indexOf("+");return t([].concat(Object(S.a)(n.slice(0,r-1)),[n[r-1]+n[r+1]],Object(S.a)(n.slice(r+2))))}},T=function(t){Object(f.a)(e,t);var n=Object(v.a)(e);function e(t){var o;return Object(p.a)(this,e),(o=n.call(this,t)).handleClick=o.handleClick.bind(Object(b.a)(o)),o.handleMouseEvent=o.handleMouseEvent.bind(Object(b.a)(o)),o.state={backgroundColor:E},o}return Object(g.a)(e,[{key:"handleClick",value:function(){var t=W(this.props.inputString,this.props.operationString,"7"),n=Object(C.a)(t,2),e=n[0],o=n[1];e!==this.props.inputString&&this.props.inputStringAction(e),o!==this.props.operationString&&this.props.operationStringAction(o)}},{key:"handleMouseEvent",value:function(t){"mousedown"===t.type||"touchstart"===t.type?this.setState({backgroundColor:m}):"mouseup"!==t.type&&"touchend"!==t.type||this.setState({backgroundColor:E})}},{key:"render",value:function(){var t=this.props.innerWindowWidth,n=this.props.innerWindowHeight,e={gridColumnStart:2,gridColumnEnd:3,gridRowStart:2,gridRowEnd:3,borderBottom:"3px solid black",borderRight:"3px solid black",display:"flex",flexDirection:"column",justifyContent:"center",backgroundColor:this.state.backgroundColor};return n>t&&(e.gridRowStart=3,e.gridRowEnd=4,e.gridColumnStart=1,e.gridColumnEnd=2),i.a.createElement("div",{id:"seven",style:e,className:"clickable",onClick:this.handleLine truncated (this["webpackJsonpcalculator-react"]=this["webpackJsonpcalculator-react"]||[]).push([[0],{24:function(t,n,e){t.exports=e(37)},33:function(t,n,e){},37:function(t,n,e){"use strict";e.r(n);var o=e(0),i=e.n(o),r=e(16),a=e.n(r),u=e(2),c=e(13),s=function(t){return{type:"SETINPUTSTRING",inputString:t}},l=function(t){return{type:"SETOPERATIONSTRING",operationString:t}},d=Object(c.b)({innerWindowWidth:function(t,n){switch(t||(t=window.innerWidth),n.type){case"SETWINDOWINNERWIDTH":return n.windowInnerWidth;default:return t}},innerWindowHeight:function(t,n){switch(t||(t=window.innerHeight),n.type){case"SETWINDOWINNERHEIGHT":return n.windowInnerHeight;default:return t}},inputString:function(t,n){switch(t||(t=""),n.type){case"SETINPUTSTRING":return n.inputString;default:return t}},operationString:function(t,n){switch(t||(t=""),n.type){case"SETOPERATIONSTRING":return n.operationString;default:return t}}}),h=Object(c.c)(d),p=(e(33),e(3)),g=e(4),b=e(1),f=e(6),v=e(5),k=e(7),C=e(8),S=e(12),m="#00293C",E="#1e656d",y="#6d261e",j="#656d1e",O="#261e6d",w="#f1f3ce",M="#f62a00",R=["*","/","-","+"],W=function(t,n,e){var o=t,i=n.includes("=")?n.split("=")[1]:n,r=i;i.length>0&&["*","/","+","-","="].includes(e)&&"."===i.slice(-1)&&(i=i.slice(0,-1));if(["1","2","3","4","5","6","7","8","9"].includes(e))0===t.length?(o=e,r=i+e):1===t.length?"0"===t[0]?(o=e,r=i.slice(0,-1)+e):"-"===t[0]?1===i.length?(o=t+e,r=t+e):(o=t+e,r=i+e):["*","/","+"].includes(t[0])?(o=e,r=i+e):(o=t+e,r=i+e):2===t.length?"-"===t[0]&&"0"===t[1]?(o="-"+e,r=i.slice(0,-1)+e):(o=t+e,r=i+e):t.length>2&&(o=t+e,r=i+e);else if("0"===e)0===t.length?(o=e,r=i+e):1===t.length?"0"!==t[0]&&(["*","/","+"].includes(t[0])?(o=e,r=i+e):(o=t+e,r=i+e)):2===t.length?("-"!==t[0]||"0"!==t[1])&&(o=t+e,r=i+e):t.length>2&&(o=t+e,r=i+e);else if("-"===e)0===i.length?(o=e,r=e):1===i.length&&R.includes(i[0])||(o=e,r=i+e);else if(["*","/","+"].includes(e))1===i.length?R.includes(i.slice(-1))||(r=i+e,o=e):i.length>1&&(o=e,r=i+e);else if("."!==e||t.includes("."))if("="===e&&i.length>0){var a=i.slice(-1);R.includes(a)||"."===a?(o=x(i.slice(0,-1)),r=i.slice(0,-1)+"="+o):r=i+"="+(o=x(i))}else"b"===e&&(1===i.length?(o=t.slice(0,-1),r=i.slice(0,-1)):i.length>1&&(R.includes(i.slice(-1))?R.includes(i.slice(-2,-1))?(o=i.slice(-2,-1),r=i.slice(0,-1)):o=(r=i.slice(0,-1)).split(/[-*/+]/).slice(-1)[0]:R.includes(i.slice(-2,-1))?(o=i.slice(-2,-1),r=i.slice(0,-1)):(o=t.slice(0,-1),r=i.slice(0,-1))));else 0===t.length?(o="0.",r=i+"0."):1===t.length?0===i.length?"-"===t[0]?(o="-0.",r=i+"-0."):(o=t+e,r=i+e):R.includes(t[0])?(o="0.",r=i+"0."):(o=t+e,r=i+e):(o=t+e,r=i+e);return[o,r]},x=function(t){var n=[];for(t.split("").forEach((function(t,e){if(0===e)n.push(t);else if(R.includes(t))n.push(t);else if("-"===n[n.length-1])if(1===e||R.includes(n[n.length-2])){var o=n[n.length-1];n[n.length-1]=o+t}else n.push(t);else if(["*","/","+"].includes(n[n.length-1]))n.push(t);else{var i=n[n.length-1];n[n.length-1]=i+t}}));R.includes(n[n.length-1]);)n.pop();var e=n.filter((function(t,e){return!R.includes(n[e+1])||!R.includes(t)}));return 1===e.length?e[0]:A(e.map((function(t){return R.includes(t)?t:t.includes(".")?parseFloat(t):parseInt(t)})))[0].toString()},A=function t(n){if(1===n.length)return n;if(n.includes("*")){var e=n.indexOf("*");return t([].concat(Object(S.a)(n.slice(0,e-1)),[n[e-1]*n[e+1]],Object(S.a)(n.slice(e+2))))}if(n.includes("/")){var o=n.indexOf("/");return t([].concat(Object(S.a)(n.slice(0,o-1)),[n[o-1]/n[o+1]],Object(S.a)(n.slice(o+2))))}if(n.includes("-")){var i=n.indexOf("-");return t([].concat(Object(S.a)(n.slice(0,i-1)),[n[i-1]-n[i+1]],Object(S.a)(n.slice(i+2))))}if(n.includes("+")){var r=n.indexOf("+");return t([].concat(Object(S.a)(n.slice(0,r-1)),[n[r-1]+n[r+1]],Object(S.a)(n.slice(r+2))))}},T=function(t){Object(f.a)(e,t);var n=Object(v.a)(e);function e(t){var o;return Object(p.a)(this,e),(o=n.call(this,t)).handleClick=o.handleClick.bind(Object(b.a)(o)),o.handleMouseEvent=o.handleMouseEvent.bind(Object(b.a)(o)),o.state={backgroundColor:E},o}return Object(g.a)(e,[{key:"handleClick",value:function(){var t=W(this.props.inputString,this.props.operationString,"7"),n=Object(C.a)(t,2),e=n[0],o=n[1];e!==this.props.inputString&&this.props.inputStringAction(e),o!==this.props.operationString&&this.props.operationStringAction(o)}},{key:"handleMouseEvent",value:function(t){"mousedown"===t.type||"touchstart"===t.type?this.setState({backgroundColor:m}):"mouseup"!==t.type&&"touchend"!==t.type||this.setState({backgroundColor:E})}},{key:"render",value:function(){var t=this.props.innerWindowWidth,n=this.props.innerWindowHeight,e={gridColumnStart:2,gridColumnEnd:3,gridRowStart:2,gridRowEnd:3,borderBottom:"3px solid black",borderRight:"3px solid black",display:"flex",flexDirection:"column",justifyContent:"center",backgroundColor:this.state.backgroundColor};return n>t&&(e.gridRowStart=3,e.gridRowEnd=4,e.gridColumnStart=1,e.gridColumnEnd=2),i.a.createElement("div",{id:"seven",style:e,className:"clickable",onClick:this.handleLine truncated
//# sourceMappingURL=main.bfd616ae.chunk.js.map //# sourceMappingURL=main.78f555dc.chunk.js.map
@@ -0,0 +1 @@
{"version":3,"sources":["actions/inputStringAction.js","actions/operationStringAction.js","reducers/rootReducer.js","reducers/innerWindowWidthReducer.js","actions/innerWindowWidthAction.js","reducers/innerWindowHeightReducer.js","actions/innerWindowHeightAction.js","reducers/inputStringReducer.js","reducers/operationStringReducer.js","store.js","globals.js","Seven.js","Eight.js","Nine.js","Four.js","Five.js","Six.js","One.js","Two.js","Three.js","Zero.js","Decimal.js","Clear.js","Divide.js","Multiply.js","Subtract.js","Add.js","Equals.js","DisplayInput.js","DisplayOperations.js","Display.js","Back.js","CalculatorGrid.js","Calculator.js","App.js","serviceWorker.js","index.js"],"names":["inputStringAction","inputString","type","operationStringAction","operationString","combineReducers","innerWindowWidth","state","action","window","innerWidth","windowInnerWidth","innerWindowHeight","innerHeight","windowInnerHeight","store","createStore","rootReducer","colors","operators","makeInputAndOperationsStrings","nextChar","inputStringResult","tempOperationString","includes","split","operationStringResult","length","slice","lastOperationChar","parseAndCalculate","statementArray","forEach","item","index","push","previous","pop","duplicateOperatorsFilteredArray","filter","calculate","map","parseFloat","parseInt","toString","indexOfOperator","indexOf","Seven","props","handleClick","bind","handleMouseEvent","backgroundColor","this","e","setState","width","height","style","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","borderBottom","borderRight","display","flexDirection","justifyContent","id","className","onClick","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","React","Component","connect","dispatch","Eight","Nine","Four","Five","Six","One","Two","Three","Zero","borderRadius","Decimal","Clear","Divide","alignItems","icon","faDivide","Multiply","faTimes","Subtract","faMinus","Add","faPlus","Equals","fontSize","DisplayInput","textAlign","lineHeight","DisplayOperations","color","Display","textOverflow","whiteSpace","overflow","Back","faBackspace","CalculatorGrid","gridTemplateRows","gridTemplateColumns","Calculator","handleKeyPress","handleKey","key","keyCode","preventDefault","document","addEventListener","removeEventListener","topMargin","Math","round","sideMargin","marginTop","marginBottom","marginLeft","marginRight","overFlow","border","userSelect","MozUserSelect","WebkitUserSelect","zIndex","fontFamily","App","handleResize","innerWindowWidthAction","innerWindowHeightAction","gitHubLabelStyle","position","right","attachmentStyle","href","target","rel","src","alt","data-recalc-dims","Boolean","location","hostname","match","ReactDOM","render","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch","error","console","message"],"mappings":"+OAEaA,EAAoB,SAACC,GAChC,MAAO,CACLC,KAJ0B,iBAK1BD,YAAaA,ICHJE,EAAwB,SAACC,GACpC,MA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ions/inputStringAction.js","actions/operationStringAction.js","reducers/rootReducer.js","reducers/innerWindowWidthReducer.js","actions/innerWindowWidthAction.js","reducers/innerWindowHeightReducer.js","actions/innerWindowHeightAction.js","reducers/inputStringReducer.js","reducers/operationStringReducer.js","store.js","globals.js","Seven.js","Eight.js","Nine.js","Four.js","Five.js","Six.js","One.js","Two.js","Three.js","Zero.js","Decimal.js","Clear.js","Divide.js","Multiply.js","Subtract.js","Add.js","Equals.js","DisplayInput.js","DisplayOperations.js","Display.js","Back.js","CalculatorGrid.js","Calculator.js","App.js","serviceWorker.js","index.js"],"names":["inputStringAction","inputString","type","operationStringAction","operationString","combineReducers","innerWindowWidth","state","action","window","innerWidth","windowInnerWidth","innerWindowHeight","innerHeight","windowInnerHeight","store","createStore","rootReducer","colors","operators","makeInputAndOperationsStrings","nextChar","inputStringResult","tempOperationString","includes","split","operationStringResult","length","slice","lastOperationChar","parseAndCalculate","statementArray","forEach","item","index","push","previous","pop","duplicateOperatorsFilteredArray","filter","calculate","map","parseFloat","parseInt","toString","indexOfOperator","indexOf","Seven","props","handleClick","bind","handleMouseEvent","backgroundColor","this","e","setState","width","height","style","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","borderBottom","borderRight","display","flexDirection","justifyContent","id","className","onClick","onTouchStart","onTouchEnd","onMouseDown","onMouseUp","React","Component","connect","dispatch","Eight","Nine","Four","Five","Six","One","Two","Three","Zero","borderRadius","Decimal","Clear","Divide","alignItems","icon","faDivide","Multiply","faTimes","Subtract","faMinus","Add","faPlus","Equals","fontSize","DisplayInput","textAlign","lineHeight","DisplayOperations","color","Display","textOverflow","whiteSpace","overflow","Back","faBackspace","CalculatorGrid","gridTemplateRows","gridTemplateColumns","Calculator","handleKeyPress","handleKey","key","keyCode","preventDefault","document","addEventListener","removeEventListener","topMargin","Math","round","sideMargin","marginTop","marginBottom","marginLeft","marginRight","overFlow","border","userSelect","MozUserSelect","WebkitUserSelect","zIndex","fontFamily","App","handleResize","innerWindowWidthAction","innerWindowHeightAction","gitHubLabelStyle","position","right","attachmentStyle","href","target","rel","src","alt","data-recalc-dims","Boolean","location","hostname","match","ReactDOM","render","getElementById","navigator","serviceWorker","ready","then","registration","unregister","catch","error","console","message"],"mappings":"+OAEaA,EAAoB,SAACC,GAChC,MAAO,CACLC,KAJ0B,iBAK1BD,YAAaA,ICHJE,EAAwB,SAACC,GACpC,MAAO,CACLF,KAJ8B,qBAK9BE,gBAAiBA,ICCNC,cAAgB,CAC7BC,iBCLa,SAACC,EAAOC,GAKrB,OAJKD,IACHA,EAAQE,OAAOC,YAGTF,EAAON,MACb,ICR+B,sBDS7B,OAAOM,EAAOG,iBAChB,QACE,OAAOJ,IDHXK,kBGNa,SAACL,EAAOC,GAKrB,OAJKD,IACHA,EAAQE,OAAOI,aAGTL,EAAON,MACb,ICRgC,uBDS9B,OAAOM,EAAOM,kBAChB,QACE,OAAOP,IHFXN,YKPa,SAACM,EAAOC,GAKrB,OAJKD,IACHA,EAAQ,IAGFC,EAAON,MACb,IPR0B,iBOSxB,OAAOM,EAAOP,YAChB,QACE,OAAOM,ILDXH,gBMRa,SAACG,EAAOC,GAKrB,OAJKD,IACHA,EAAQ,IAGFC,EAAON,MACb,IPR8B,qBOS5B,OAAOM,EAAOJ,gBAChB,QACE,OAAOG,MCNEQ,EAFDC,YAAYC,G,iECHbC,EACC,UADDA,EAEE,UAFFA,EAGC,UAHDA,EAIE,UAJFA,EAKC,UALDA,EAMA,UANAA,EAOM,UAGbC,EAAY,CAAC,IAAI,IAAI,IAAI,KAElBC,EAAgC,SAACnB,EAAYG,EAAgBiB,GACxE,IAAIC,EAAoBrB,EACpBsB,EAAsBnB,EAAgBoB,SAAS,KAAOpB,EAAgBqB,MAAM,KAAK,GAAKrB,EACtFsB,EAAwBH,EAExBA,EAAoBI,OAAS,GAAK,CAAC,IAAI,IAAI,IAAI,IAAI,KAAKH,SAASH,IAA+C,MAAlCE,EAAoBK,OAAO,KAC3GL,EAAsBA,EAAoBK,MAAM,G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,EAAwBH,EAAsBF,QAE7C,GAAiB,MAAbA,EAC0B,IAA/BE,EAAoBI,QACtBL,EAAoBD,EACpBK,EAAwBL,GACgB,IAA/BE,EAAoBI,QACxBR,EAAUK,SAASD,EAAoB,MAK5CD,EAAoBD,EACpBK,EAAyBH,EAAsBF,QAE5C,GAAI,CLine truncated
+1
View File
@@ -86,6 +86,7 @@ class Calculator extends React.Component {
style['marginRight'] = '89px'; style['marginRight'] = '89px';
} else if (height > width) { } else if (height > width) {
style['height'] = '75vh'; style['height'] = '75vh';
style['minHeight'] = 481;
style['width'] = '100vw'; style['width'] = '100vw';
style['marginTop'] = '12vh'; style['marginTop'] = '12vh';
style['marginBottom'] = 'unset'; style['marginBottom'] = 'unset';