zeroclickinfo-goodies/share/goodie/calculator/content.handlebars

85 lines
4.5 KiB
Handlebars
Raw Permalink Normal View History

<div class="calculator--wrap tile--calculator" tabindex="0">
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
<div class="tile__calc clearfix">
<button class="tile__skip-calc">Skip calculator</button>
<div class="tile__display">
<div class="tile__display__aside--wrap">
<span class="tile__display__aside" id="expression"></span>
</div>
<span class="tile__display__main" id="display"></span>
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
Calculator: [Phase 2] Add Scientific calculator (#4067) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Initial PR for Phase 2 * Add support for brackets. * Added support for Pi * Add support for sin, tan, cos * Added factorial support * Add support for squared / cubed functions * Add support for natural log * Support log_10 function. * Add support for square roots. * Add eulers number. * Implement Engineers Exponent / Formatted Funcs. * Add sci-tab id to handlebars. * Removed positioning for mobile display. * Custom exponents :rocket: * Implemented Euler exponent * Support 1/x button. * Interactified deg/rad toggle. * Add support for degrees / radians * Fix radians bug. * Zaahirs / Mintsofts syntactic changes. * Fixed regex for exponents * Removed blue from toggle. * Allow backspacing through functions. * Allow backspacing through exponents. * Fix +99% bug. * Allow flipping of keypads. * Stop ! being entered first. * Stop EE being entered at start or multiple. * Allow step back through EE * Disallow multiple periods. [skip ci] * Rewrote query to handle natural language. * Addressed phase 1 feedback. * Fixed backspace bug. * Allow backspacing through constants. * Add auto paren support for funcs. * Started the commenting :boom: * Add some comments. * Updated PercentNormalizer comment. * Fix 0/0 Error. * Add 'c' key support * Fix back spacing. * Positioned deg / rad toggle. * Refactoring code. Stage 1. * Added high signal. * Add funcs for Initite/NaN * Moved eval info into separate function. * Abstracted clear function. * Add paren manager. * Refactored out paren state. * Refactored out parenState global * Removed meta. * Backspace through functions. * Set signal to high. * Fixed signal * Pushing updated code. * Refactored backspacing. * Fix up messy code / document. * Fixed + percent bug. * Support EE on mobile. * opens pseudo paren for 1/(x) * Fix large factorial issue. * Allow pi | e as exponent. * use exponents on π and e. * Removed +-3 issue. * Natural log and log now work as exponents * nit: cleaned up expression. * Fixed percent error. * Add phase 3 ledger span (hidden) * Disabled add digits. * Check in UX fixes. * Some light refactoring. * Swap functions. * Fixed shoddy regex. * Add ledger object for phase 3. * Updated percentage / trig regex * Add blank expression if error. * Allow factorial on decimals. * Update code + comments. * Add in calc trigger word. Fixed Backspace. * All backspacing fixed. * Try to recover from open/unfinished exponent * Add high signal for * Update comments. * Updated comments. * improve calculator regex * Strip trailing spaces` * Updated signal code. * Fixed backspacing issue. * swap id for class (ParenManger) * Remove console logs. * Update comment. * Fix bug in regex replacement. * Calculator: [Phase 3] Add History / Calc reloading (#4081) * Set up UI. * Phase 3 implemented. * Remove array. Replace with handlebars. * strip commas by default. * Fixed html interpolation * Add g flag to replacement regex * Strip trailing spaces * remove unneeded option from perl * Added comments to backspace. * Removed ledger properties. Updated using state. * Addressed Zaahir's p2 feedback
2017-04-12 12:31:12 -07:00
<ul class="tile__options">
<li class="tile__option tile__option__sci" data-tab="sci"><span>Scientific</span></li>
<li class="tile__option tile__option__basic tile__option--active" data-tab="basic"><span>Basic</span></li>
<li class="tile__option tile__option__history" data-tab="history" ><span>History</span></li>
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
</ul>
</div>
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
<div class="tile__tabs">
<!-- scientific keyboard -->
Calculator: [Phase 2] Add Scientific calculator (#4067) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Initial PR for Phase 2 * Add support for brackets. * Added support for Pi * Add support for sin, tan, cos * Added factorial support * Add support for squared / cubed functions * Add support for natural log * Support log_10 function. * Add support for square roots. * Add eulers number. * Implement Engineers Exponent / Formatted Funcs. * Add sci-tab id to handlebars. * Removed positioning for mobile display. * Custom exponents :rocket: * Implemented Euler exponent * Support 1/x button. * Interactified deg/rad toggle. * Add support for degrees / radians * Fix radians bug. * Zaahirs / Mintsofts syntactic changes. * Fixed regex for exponents * Removed blue from toggle. * Allow backspacing through functions. * Allow backspacing through exponents. * Fix +99% bug. * Allow flipping of keypads. * Stop ! being entered first. * Stop EE being entered at start or multiple. * Allow step back through EE * Disallow multiple periods. [skip ci] * Rewrote query to handle natural language. * Addressed phase 1 feedback. * Fixed backspace bug. * Allow backspacing through constants. * Add auto paren support for funcs. * Started the commenting :boom: * Add some comments. * Updated PercentNormalizer comment. * Fix 0/0 Error. * Add 'c' key support * Fix back spacing. * Positioned deg / rad toggle. * Refactoring code. Stage 1. * Added high signal. * Add funcs for Initite/NaN * Moved eval info into separate function. * Abstracted clear function. * Add paren manager. * Refactored out paren state. * Refactored out parenState global * Removed meta. * Backspace through functions. * Set signal to high. * Fixed signal * Pushing updated code. * Refactored backspacing. * Fix up messy code / document. * Fixed + percent bug. * Support EE on mobile. * opens pseudo paren for 1/(x) * Fix large factorial issue. * Allow pi | e as exponent. * use exponents on π and e. * Removed +-3 issue. * Natural log and log now work as exponents * nit: cleaned up expression. * Fixed percent error. * Add phase 3 ledger span (hidden) * Disabled add digits. * Check in UX fixes. * Some light refactoring. * Swap functions. * Fixed shoddy regex. * Add ledger object for phase 3. * Updated percentage / trig regex * Add blank expression if error. * Allow factorial on decimals. * Update code + comments. * Add in calc trigger word. Fixed Backspace. * All backspacing fixed. * Try to recover from open/unfinished exponent * Add high signal for * Update comments. * Updated comments. * improve calculator regex * Strip trailing spaces` * Updated signal code. * Fixed backspacing issue. * swap id for class (ParenManger) * Remove console logs. * Update comment. * Fix bug in regex replacement. * Calculator: [Phase 3] Add History / Calc reloading (#4081) * Set up UI. * Phase 3 implemented. * Remove array. Replace with handlebars. * strip commas by default. * Fixed html interpolation * Add g flag to replacement regex * Strip trailing spaces * remove unneeded option from perl * Added comments to backspace. * Removed ledger properties. Updated using state. * Addressed Zaahir's p2 feedback
2017-04-12 12:31:12 -07:00
<div class="tile__calc__col tile__tab__sci">
<span class="tile__ctrl__toggle">
<span>RAD</span>
<label class="tile__ctrl__toggle-indicator">
<input type="checkbox" id="tile__ctrl__toggle-checkbox">
<div class="tile__ctrl__toggle-slider tile__ctrl__round-icon"></div>
</label>
<span>DEG</span>
</span>
<button class="tile__ctrl__btn" value="(">(</button>
<button class="tile__ctrl__btn" value=")">)</button>
Calculator: [Phase 2] Add Scientific calculator (#4067) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Initial PR for Phase 2 * Add support for brackets. * Added support for Pi * Add support for sin, tan, cos * Added factorial support * Add support for squared / cubed functions * Add support for natural log * Support log_10 function. * Add support for square roots. * Add eulers number. * Implement Engineers Exponent / Formatted Funcs. * Add sci-tab id to handlebars. * Removed positioning for mobile display. * Custom exponents :rocket: * Implemented Euler exponent * Support 1/x button. * Interactified deg/rad toggle. * Add support for degrees / radians * Fix radians bug. * Zaahirs / Mintsofts syntactic changes. * Fixed regex for exponents * Removed blue from toggle. * Allow backspacing through functions. * Allow backspacing through exponents. * Fix +99% bug. * Allow flipping of keypads. * Stop ! being entered first. * Stop EE being entered at start or multiple. * Allow step back through EE * Disallow multiple periods. [skip ci] * Rewrote query to handle natural language. * Addressed phase 1 feedback. * Fixed backspace bug. * Allow backspacing through constants. * Add auto paren support for funcs. * Started the commenting :boom: * Add some comments. * Updated PercentNormalizer comment. * Fix 0/0 Error. * Add 'c' key support * Fix back spacing. * Positioned deg / rad toggle. * Refactoring code. Stage 1. * Added high signal. * Add funcs for Initite/NaN * Moved eval info into separate function. * Abstracted clear function. * Add paren manager. * Refactored out paren state. * Refactored out parenState global * Removed meta. * Backspace through functions. * Set signal to high. * Fixed signal * Pushing updated code. * Refactored backspacing. * Fix up messy code / document. * Fixed + percent bug. * Support EE on mobile. * opens pseudo paren for 1/(x) * Fix large factorial issue. * Allow pi | e as exponent. * use exponents on π and e. * Removed +-3 issue. * Natural log and log now work as exponents * nit: cleaned up expression. * Fixed percent error. * Add phase 3 ledger span (hidden) * Disabled add digits. * Check in UX fixes. * Some light refactoring. * Swap functions. * Fixed shoddy regex. * Add ledger object for phase 3. * Updated percentage / trig regex * Add blank expression if error. * Allow factorial on decimals. * Update code + comments. * Add in calc trigger word. Fixed Backspace. * All backspacing fixed. * Try to recover from open/unfinished exponent * Add high signal for * Update comments. * Updated comments. * improve calculator regex * Strip trailing spaces` * Updated signal code. * Fixed backspacing issue. * swap id for class (ParenManger) * Remove console logs. * Update comment. * Fix bug in regex replacement. * Calculator: [Phase 3] Add History / Calc reloading (#4081) * Set up UI. * Phase 3 implemented. * Remove array. Replace with handlebars. * strip commas by default. * Fixed html interpolation * Add g flag to replacement regex * Strip trailing spaces * remove unneeded option from perl * Added comments to backspace. * Removed ledger properties. Updated using state. * Addressed Zaahir's p2 feedback
2017-04-12 12:31:12 -07:00
<button class="tile__ctrl__btn" value="sin(">sin</button>
<button class="tile__ctrl__btn" value="cos(">cos</button>
<button class="tile__ctrl__btn" value="tan(">tan</button>
<button class="tile__ctrl__btn" value="π">&#x3c0;</button>
Calculator: [Phase 2] Add Scientific calculator (#4067) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Initial PR for Phase 2 * Add support for brackets. * Added support for Pi * Add support for sin, tan, cos * Added factorial support * Add support for squared / cubed functions * Add support for natural log * Support log_10 function. * Add support for square roots. * Add eulers number. * Implement Engineers Exponent / Formatted Funcs. * Add sci-tab id to handlebars. * Removed positioning for mobile display. * Custom exponents :rocket: * Implemented Euler exponent * Support 1/x button. * Interactified deg/rad toggle. * Add support for degrees / radians * Fix radians bug. * Zaahirs / Mintsofts syntactic changes. * Fixed regex for exponents * Removed blue from toggle. * Allow backspacing through functions. * Allow backspacing through exponents. * Fix +99% bug. * Allow flipping of keypads. * Stop ! being entered first. * Stop EE being entered at start or multiple. * Allow step back through EE * Disallow multiple periods. [skip ci] * Rewrote query to handle natural language. * Addressed phase 1 feedback. * Fixed backspace bug. * Allow backspacing through constants. * Add auto paren support for funcs. * Started the commenting :boom: * Add some comments. * Updated PercentNormalizer comment. * Fix 0/0 Error. * Add 'c' key support * Fix back spacing. * Positioned deg / rad toggle. * Refactoring code. Stage 1. * Added high signal. * Add funcs for Initite/NaN * Moved eval info into separate function. * Abstracted clear function. * Add paren manager. * Refactored out paren state. * Refactored out parenState global * Removed meta. * Backspace through functions. * Set signal to high. * Fixed signal * Pushing updated code. * Refactored backspacing. * Fix up messy code / document. * Fixed + percent bug. * Support EE on mobile. * opens pseudo paren for 1/(x) * Fix large factorial issue. * Allow pi | e as exponent. * use exponents on π and e. * Removed +-3 issue. * Natural log and log now work as exponents * nit: cleaned up expression. * Fixed percent error. * Add phase 3 ledger span (hidden) * Disabled add digits. * Check in UX fixes. * Some light refactoring. * Swap functions. * Fixed shoddy regex. * Add ledger object for phase 3. * Updated percentage / trig regex * Add blank expression if error. * Allow factorial on decimals. * Update code + comments. * Add in calc trigger word. Fixed Backspace. * All backspacing fixed. * Try to recover from open/unfinished exponent * Add high signal for * Update comments. * Updated comments. * improve calculator regex * Strip trailing spaces` * Updated signal code. * Fixed backspacing issue. * swap id for class (ParenManger) * Remove console logs. * Update comment. * Fix bug in regex replacement. * Calculator: [Phase 3] Add History / Calc reloading (#4081) * Set up UI. * Phase 3 implemented. * Remove array. Replace with handlebars. * strip commas by default. * Fixed html interpolation * Add g flag to replacement regex * Strip trailing spaces * remove unneeded option from perl * Added comments to backspace. * Removed ledger properties. Updated using state. * Addressed Zaahir's p2 feedback
2017-04-12 12:31:12 -07:00
<button class="tile__ctrl__btn" value="!">x!</button>
<button class="tile__ctrl__btn" value="<sup>2</sup>">x<sup>2</sup></button>
<button class="tile__ctrl__btn" value="<sup>3</sup>">x<sup>3</sup></button>
<button class="tile__ctrl__btn" value="<sup>□</sup>">x<sup>y</sup></button>
Calculator: [Phase 2] Add Scientific calculator (#4067) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Initial PR for Phase 2 * Add support for brackets. * Added support for Pi * Add support for sin, tan, cos * Added factorial support * Add support for squared / cubed functions * Add support for natural log * Support log_10 function. * Add support for square roots. * Add eulers number. * Implement Engineers Exponent / Formatted Funcs. * Add sci-tab id to handlebars. * Removed positioning for mobile display. * Custom exponents :rocket: * Implemented Euler exponent * Support 1/x button. * Interactified deg/rad toggle. * Add support for degrees / radians * Fix radians bug. * Zaahirs / Mintsofts syntactic changes. * Fixed regex for exponents * Removed blue from toggle. * Allow backspacing through functions. * Allow backspacing through exponents. * Fix +99% bug. * Allow flipping of keypads. * Stop ! being entered first. * Stop EE being entered at start or multiple. * Allow step back through EE * Disallow multiple periods. [skip ci] * Rewrote query to handle natural language. * Addressed phase 1 feedback. * Fixed backspace bug. * Allow backspacing through constants. * Add auto paren support for funcs. * Started the commenting :boom: * Add some comments. * Updated PercentNormalizer comment. * Fix 0/0 Error. * Add 'c' key support * Fix back spacing. * Positioned deg / rad toggle. * Refactoring code. Stage 1. * Added high signal. * Add funcs for Initite/NaN * Moved eval info into separate function. * Abstracted clear function. * Add paren manager. * Refactored out paren state. * Refactored out parenState global * Removed meta. * Backspace through functions. * Set signal to high. * Fixed signal * Pushing updated code. * Refactored backspacing. * Fix up messy code / document. * Fixed + percent bug. * Support EE on mobile. * opens pseudo paren for 1/(x) * Fix large factorial issue. * Allow pi | e as exponent. * use exponents on π and e. * Removed +-3 issue. * Natural log and log now work as exponents * nit: cleaned up expression. * Fixed percent error. * Add phase 3 ledger span (hidden) * Disabled add digits. * Check in UX fixes. * Some light refactoring. * Swap functions. * Fixed shoddy regex. * Add ledger object for phase 3. * Updated percentage / trig regex * Add blank expression if error. * Allow factorial on decimals. * Update code + comments. * Add in calc trigger word. Fixed Backspace. * All backspacing fixed. * Try to recover from open/unfinished exponent * Add high signal for * Update comments. * Updated comments. * improve calculator regex * Strip trailing spaces` * Updated signal code. * Fixed backspacing issue. * swap id for class (ParenManger) * Remove console logs. * Update comment. * Fix bug in regex replacement. * Calculator: [Phase 3] Add History / Calc reloading (#4081) * Set up UI. * Phase 3 implemented. * Remove array. Replace with handlebars. * strip commas by default. * Fixed html interpolation * Add g flag to replacement regex * Strip trailing spaces * remove unneeded option from perl * Added comments to backspace. * Removed ledger properties. Updated using state. * Addressed Zaahir's p2 feedback
2017-04-12 12:31:12 -07:00
<button class="tile__ctrl__btn" value="1/(">1/x</button>
<button class="tile__ctrl__btn" value="&#x221A;(">&#x221A;x</button>
<button class="tile__ctrl__btn" value="<sup>□</sup>&#x221A"><sup>x</sup>&#x221A;y</button>
<button class="tile__ctrl__btn" value="EE">EE</button>
Calculator: [Phase 2] Add Scientific calculator (#4067) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Initial PR for Phase 2 * Add support for brackets. * Added support for Pi * Add support for sin, tan, cos * Added factorial support * Add support for squared / cubed functions * Add support for natural log * Support log_10 function. * Add support for square roots. * Add eulers number. * Implement Engineers Exponent / Formatted Funcs. * Add sci-tab id to handlebars. * Removed positioning for mobile display. * Custom exponents :rocket: * Implemented Euler exponent * Support 1/x button. * Interactified deg/rad toggle. * Add support for degrees / radians * Fix radians bug. * Zaahirs / Mintsofts syntactic changes. * Fixed regex for exponents * Removed blue from toggle. * Allow backspacing through functions. * Allow backspacing through exponents. * Fix +99% bug. * Allow flipping of keypads. * Stop ! being entered first. * Stop EE being entered at start or multiple. * Allow step back through EE * Disallow multiple periods. [skip ci] * Rewrote query to handle natural language. * Addressed phase 1 feedback. * Fixed backspace bug. * Allow backspacing through constants. * Add auto paren support for funcs. * Started the commenting :boom: * Add some comments. * Updated PercentNormalizer comment. * Fix 0/0 Error. * Add 'c' key support * Fix back spacing. * Positioned deg / rad toggle. * Refactoring code. Stage 1. * Added high signal. * Add funcs for Initite/NaN * Moved eval info into separate function. * Abstracted clear function. * Add paren manager. * Refactored out paren state. * Refactored out parenState global * Removed meta. * Backspace through functions. * Set signal to high. * Fixed signal * Pushing updated code. * Refactored backspacing. * Fix up messy code / document. * Fixed + percent bug. * Support EE on mobile. * opens pseudo paren for 1/(x) * Fix large factorial issue. * Allow pi | e as exponent. * use exponents on π and e. * Removed +-3 issue. * Natural log and log now work as exponents * nit: cleaned up expression. * Fixed percent error. * Add phase 3 ledger span (hidden) * Disabled add digits. * Check in UX fixes. * Some light refactoring. * Swap functions. * Fixed shoddy regex. * Add ledger object for phase 3. * Updated percentage / trig regex * Add blank expression if error. * Allow factorial on decimals. * Update code + comments. * Add in calc trigger word. Fixed Backspace. * All backspacing fixed. * Try to recover from open/unfinished exponent * Add high signal for * Update comments. * Updated comments. * improve calculator regex * Strip trailing spaces` * Updated signal code. * Fixed backspacing issue. * swap id for class (ParenManger) * Remove console logs. * Update comment. * Fix bug in regex replacement. * Calculator: [Phase 3] Add History / Calc reloading (#4081) * Set up UI. * Phase 3 implemented. * Remove array. Replace with handlebars. * strip commas by default. * Fixed html interpolation * Add g flag to replacement regex * Strip trailing spaces * remove unneeded option from perl * Added comments to backspace. * Removed ledger properties. Updated using state. * Addressed Zaahir's p2 feedback
2017-04-12 12:31:12 -07:00
<button class="tile__ctrl__btn" value="log(">log</button>
<button class="tile__ctrl__btn" value="ln(">ln</button>
<button class="tile__ctrl__btn" value="e<sup>□</sup>">e<sup>x</sup></button>
<button class="tile__ctrl__btn" value="e">e</button>
Calculator: [Phase 2] Add Scientific calculator (#4067) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Initial PR for Phase 2 * Add support for brackets. * Added support for Pi * Add support for sin, tan, cos * Added factorial support * Add support for squared / cubed functions * Add support for natural log * Support log_10 function. * Add support for square roots. * Add eulers number. * Implement Engineers Exponent / Formatted Funcs. * Add sci-tab id to handlebars. * Removed positioning for mobile display. * Custom exponents :rocket: * Implemented Euler exponent * Support 1/x button. * Interactified deg/rad toggle. * Add support for degrees / radians * Fix radians bug. * Zaahirs / Mintsofts syntactic changes. * Fixed regex for exponents * Removed blue from toggle. * Allow backspacing through functions. * Allow backspacing through exponents. * Fix +99% bug. * Allow flipping of keypads. * Stop ! being entered first. * Stop EE being entered at start or multiple. * Allow step back through EE * Disallow multiple periods. [skip ci] * Rewrote query to handle natural language. * Addressed phase 1 feedback. * Fixed backspace bug. * Allow backspacing through constants. * Add auto paren support for funcs. * Started the commenting :boom: * Add some comments. * Updated PercentNormalizer comment. * Fix 0/0 Error. * Add 'c' key support * Fix back spacing. * Positioned deg / rad toggle. * Refactoring code. Stage 1. * Added high signal. * Add funcs for Initite/NaN * Moved eval info into separate function. * Abstracted clear function. * Add paren manager. * Refactored out paren state. * Refactored out parenState global * Removed meta. * Backspace through functions. * Set signal to high. * Fixed signal * Pushing updated code. * Refactored backspacing. * Fix up messy code / document. * Fixed + percent bug. * Support EE on mobile. * opens pseudo paren for 1/(x) * Fix large factorial issue. * Allow pi | e as exponent. * use exponents on π and e. * Removed +-3 issue. * Natural log and log now work as exponents * nit: cleaned up expression. * Fixed percent error. * Add phase 3 ledger span (hidden) * Disabled add digits. * Check in UX fixes. * Some light refactoring. * Swap functions. * Fixed shoddy regex. * Add ledger object for phase 3. * Updated percentage / trig regex * Add blank expression if error. * Allow factorial on decimals. * Update code + comments. * Add in calc trigger word. Fixed Backspace. * All backspacing fixed. * Try to recover from open/unfinished exponent * Add high signal for * Update comments. * Updated comments. * improve calculator regex * Strip trailing spaces` * Updated signal code. * Fixed backspacing issue. * swap id for class (ParenManger) * Remove console logs. * Update comment. * Fix bug in regex replacement. * Calculator: [Phase 3] Add History / Calc reloading (#4081) * Set up UI. * Phase 3 implemented. * Remove array. Replace with handlebars. * strip commas by default. * Fixed html interpolation * Add g flag to replacement regex * Strip trailing spaces * remove unneeded option from perl * Added comments to backspace. * Removed ledger properties. Updated using state. * Addressed Zaahir's p2 feedback
2017-04-12 12:31:12 -07:00
</div>
<!-- numeric keyboard -->
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
<div class="tile__calc__col tile__tab__basic">
<button class="tile__ctrl__btn tile__ctrl--double" id="clear_button" value="C">C</button>
<button class="tile__ctrl__btn tile__ctrl--ops" value="%">%</button>
<button class="tile__ctrl__btn tile__ctrl--important" value="÷">&divide;</button>
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
<button class="tile__ctrl__btn" value="7">7</button>
<button class="tile__ctrl__btn" value="8">8</button>
<button class="tile__ctrl__btn" value="9">9</button>
<button class="tile__ctrl__btn tile__ctrl--important" value="×">&times;</button>
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
<button class="tile__ctrl__btn" value="4">4</button>
<button class="tile__ctrl__btn" value="5">5</button>
<button class="tile__ctrl__btn" value="6">6</button>
<button class="tile__ctrl__btn tile__ctrl--important" value="-">&minus;</button>
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
<button class="tile__ctrl__btn" value="1">1</button>
<button class="tile__ctrl__btn" value="2">2</button>
<button class="tile__ctrl__btn" value="3">3</button>
<button class="tile__ctrl__btn tile__ctrl--important" value="+">+</button>
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
<button class="tile__ctrl__btn tile__ctrl--double" value="0">0</button>
<button class="tile__ctrl__btn" value=".">.</button>
<button class="tile__ctrl__btn tile__ctrl--important" value="=">=</button>
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
</div>
Calculator: [Phase 2] Add Scientific calculator (#4067) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Initial PR for Phase 2 * Add support for brackets. * Added support for Pi * Add support for sin, tan, cos * Added factorial support * Add support for squared / cubed functions * Add support for natural log * Support log_10 function. * Add support for square roots. * Add eulers number. * Implement Engineers Exponent / Formatted Funcs. * Add sci-tab id to handlebars. * Removed positioning for mobile display. * Custom exponents :rocket: * Implemented Euler exponent * Support 1/x button. * Interactified deg/rad toggle. * Add support for degrees / radians * Fix radians bug. * Zaahirs / Mintsofts syntactic changes. * Fixed regex for exponents * Removed blue from toggle. * Allow backspacing through functions. * Allow backspacing through exponents. * Fix +99% bug. * Allow flipping of keypads. * Stop ! being entered first. * Stop EE being entered at start or multiple. * Allow step back through EE * Disallow multiple periods. [skip ci] * Rewrote query to handle natural language. * Addressed phase 1 feedback. * Fixed backspace bug. * Allow backspacing through constants. * Add auto paren support for funcs. * Started the commenting :boom: * Add some comments. * Updated PercentNormalizer comment. * Fix 0/0 Error. * Add 'c' key support * Fix back spacing. * Positioned deg / rad toggle. * Refactoring code. Stage 1. * Added high signal. * Add funcs for Initite/NaN * Moved eval info into separate function. * Abstracted clear function. * Add paren manager. * Refactored out paren state. * Refactored out parenState global * Removed meta. * Backspace through functions. * Set signal to high. * Fixed signal * Pushing updated code. * Refactored backspacing. * Fix up messy code / document. * Fixed + percent bug. * Support EE on mobile. * opens pseudo paren for 1/(x) * Fix large factorial issue. * Allow pi | e as exponent. * use exponents on π and e. * Removed +-3 issue. * Natural log and log now work as exponents * nit: cleaned up expression. * Fixed percent error. * Add phase 3 ledger span (hidden) * Disabled add digits. * Check in UX fixes. * Some light refactoring. * Swap functions. * Fixed shoddy regex. * Add ledger object for phase 3. * Updated percentage / trig regex * Add blank expression if error. * Allow factorial on decimals. * Update code + comments. * Add in calc trigger word. Fixed Backspace. * All backspacing fixed. * Try to recover from open/unfinished exponent * Add high signal for * Update comments. * Updated comments. * improve calculator regex * Strip trailing spaces` * Updated signal code. * Fixed backspacing issue. * swap id for class (ParenManger) * Remove console logs. * Update comment. * Fix bug in regex replacement. * Calculator: [Phase 3] Add History / Calc reloading (#4081) * Set up UI. * Phase 3 implemented. * Remove array. Replace with handlebars. * strip commas by default. * Fixed html interpolation * Add g flag to replacement regex * Strip trailing spaces * remove unneeded option from perl * Added comments to backspace. * Removed ledger properties. Updated using state. * Addressed Zaahir's p2 feedback
2017-04-12 12:31:12 -07:00
<!-- the ledger (history) section of the calculators UI -->
<ul class="tile__calc__col tile__history"></ul>
Calculator: [Phase 1] Add basic calculator (#4051) * Phase 1: Add basic calculator * Updated tests. * change template name, use base template, prefill calc with answer * fix test * Added backlog features. * Updated js. * Light refactoring work * Refactored keycodes. * Updated C button. * Rewrote (+/-)% Expressions * Updated the spacing dertermination * Added expression to UI by default. * Update tests. * Updated formatting. * Rewrite percent queries. * Pushing updated codebase. * Add calculator as trigger word * Update tests for new triggers * Stop initializing expression if 0 * add precision support to math eval object. * Removed scientific buttons / history for Phase 1 * Updated math type. * Prevents duplicate OPERADNS * Add duplicate functionality. * Updated unicode. * Removed es6 feature. * Stop first entry being an operand. * Add operator flipping. * Added Precision support. * Handle numpad operator keys * Set and maintain focus, Improved event handling * Bind click handler in loop, stopPropgation of keydown * Cleanup trailing spaces * Fixed broken assignment. * Prevent multiple commas. * Fixed calculator stalling when trying to enter a new operator * Initial refactor. * Refactored out expression array. * Refactored out display var. * reintroduced matheval object for precision. * Cleaned up formatting. * Removed commify. * Removed positioning for mobile display. * Don't set focus on Calc automatically when displayed * Add touchstart support. * Prevent zooming. * ensure button text is not selectable * Add right borders to calc, ensure same border colour * Cleanup code style * Only apply hover state css to desktop
2017-04-06 13:40:56 -07:00
</div>
</div>
</div>