Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #20 from Laaouatni/adding-popup-on-hover
Browse files Browse the repository at this point in the history
fix #19 Adding popup on hover
  • Loading branch information
Laaouatni authored Aug 18, 2022
2 parents b1dee5c + 52663f4 commit 8e37cf9
Show file tree
Hide file tree
Showing 71 changed files with 383 additions and 211 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# gcode.js
basically a gcode library for making the making gcode program easily and efficiently for CNC machines.

basically a gcode library for making the making gcode program easily and efficiently for CNC machines.
2 changes: 1 addition & 1 deletion gcode/coverage/GcodeAPI_main/GcodeAPI.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">GcodeAPI_main</
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion gcode/coverage/GcodeAPI_main/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../index.html">All files</a> GcodeAPI_main</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">GcodeAPI_
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>16/16</span>
<span class='fraction'>18/18</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">GcodeAPI_
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>16/16</span>
<span class='fraction'>18/18</span>
</div>


Expand Down Expand Up @@ -78,13 +78,17 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">GcodeAPI_
<a name='L13'></a><a href='#L13'>13</a>
<a name='L14'></a><a href='#L14'>14</a>
<a name='L15'></a><a href='#L15'>15</a>
<a name='L16'></a><a href='#L16'>16</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<a name='L16'></a><a href='#L16'>16</a>
<a name='L17'></a><a href='#L17'>17</a>
<a name='L18'></a><a href='#L18'>18</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">162x</span>
<span class="cline-any cline-yes">162x</span>
<span class="cline-any cline-yes">162x</span>
<span class="cline-any cline-yes">162x</span>
<span class="cline-any cline-yes">162x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">162x</span>
Expand All @@ -97,8 +101,10 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">GcodeAPI_
&nbsp;
export default class PushGclassesToArray {
constructor(_this) {
this.obj = _this;

this.toNotPush = ["Gcommands"];
this.pushClass(_this);
this.pushClass(this.obj);
}
&nbsp;
pushClass(_this) {
Expand All @@ -115,7 +121,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">GcodeAPI_
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
10 changes: 5 additions & 5 deletions gcode/coverage/GcodeAPI_main/other/Methods/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h1><a href="../../../index.html">All files</a> GcodeAPI_main/other/Methods</h1>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>16/16</span>
<span class='fraction'>18/18</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../../../index.html">All files</a> GcodeAPI_main/other/Methods</h1>
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>16/16</span>
<span class='fraction'>18/18</span>
</div>


Expand Down Expand Up @@ -84,13 +84,13 @@ <h1><a href="../../../index.html">All files</a> GcodeAPI_main/other/Methods</h1>
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="16" class="abs high">16/16</td>
<td data-value="18" class="abs high">18/18</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="2" class="abs high">2/2</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="16" class="abs high">16/16</td>
<td data-value="18" class="abs high">18/18</td>
</tr>

</tbody>
Expand All @@ -101,7 +101,7 @@ <h1><a href="../../../index.html">All files</a> GcodeAPI_main/other/Methods</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion gcode/coverage/Gcommands/G/G0.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">Gcommands/G<
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion gcode/coverage/Gcommands/G/G1.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h1><a href="../../index.html">All files</a> / <a href="index.html">Gcommands/G<
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion gcode/coverage/Gcommands/G/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h1><a href="../../index.html">All files</a> Gcommands/G</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion gcode/coverage/Gcommands/Gcommands.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ <h1><a href="../index.html">All files</a> / <a href="index.html">Gcommands</a> G
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion gcode/coverage/Gcommands/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../index.html">All files</a> Gcommands</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">Gcommands
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion gcode/coverage/Gcommands/other/DirectionValues/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../../../index.html">All files</a> Gcommands/other/DirectionValues<
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
53 changes: 34 additions & 19 deletions gcode/coverage/Gcommands/other/Methods/MoveTo/MoveTo.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ <h1><a href="../../../../index.html">All files</a> / <a href="index.html">Gcomma
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>45/45</span>
<span class='fraction'>50/50</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">92.85% </span>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>13/14</span>
<span class='fraction'>14/14</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../../../../index.html">All files</a> / <a href="index.html">Gcomma
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>45/45</span>
<span class='fraction'>50/50</span>
</div>


Expand Down Expand Up @@ -108,7 +108,12 @@ <h1><a href="../../../../index.html">All files</a> / <a href="index.html">Gcomma
<a name='L43'></a><a href='#L43'>43</a>
<a name='L44'></a><a href='#L44'>44</a>
<a name='L45'></a><a href='#L45'>45</a>
<a name='L46'></a><a href='#L46'>46</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<a name='L46'></a><a href='#L46'>46</a>
<a name='L47'></a><a href='#L47'>47</a>
<a name='L48'></a><a href='#L48'>48</a>
<a name='L49'></a><a href='#L49'>49</a>
<a name='L50'></a><a href='#L50'>50</a>
<a name='L51'></a><a href='#L51'>51</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-yes">1x</span>
Expand All @@ -121,6 +126,11 @@ <h1><a href="../../../../index.html">All files</a> / <a href="index.html">Gcomma
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">13x</span>
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">13x</span>
Expand Down Expand Up @@ -155,39 +165,44 @@ <h1><a href="../../../../index.html">All files</a> / <a href="index.html">Gcomma
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">import PositionSpecificy from "../../Specificy/PositionSpecificy.js";
import DirectionValues from "../../DirectionValues/DirectionValues.js";
import GcodeAPI from './../../../../GcodeAPI_main/GcodeAPI.js';
import GcodeAPI from "./../../../../GcodeAPI_main/GcodeAPI.js";
&nbsp;
export default class MoveTo {
constructor(_this, _transformObj) {
this.obj = _this;
&nbsp;
this.PositionChoosed = new PositionSpecificy(
_transformObj,
).getChoosedDirection();

&nbsp;
this.previusX = GcodeAPI.previusX ?? this.obj.x;
this.previusY = GcodeAPI.previusY ?? this.obj.y;
&nbsp;
this.toX = () =&gt; {
switch(this.PositionChoosed.x) {
switch (this.PositionChoosed.x) {
case "left":
return _this.x + new DirectionValues(_transformObj).left;
return this.previusX + new DirectionValues(_transformObj).left;
case "right":
return _this.x - new DirectionValues(_transformObj).right;
return this.previusX - new DirectionValues(_transformObj).right;
default:
return GcodeAPI.previusX ?<span class="branch-0 cbranch-no" title="branch not covered" >? _this.x;</span>
return this.previusX;
}
}
};
&nbsp;
this.toY = () =&gt; {
switch(this.PositionChoosed.y) {
switch (this.PositionChoosed.y) {
case "bottom":
return _this.y + new DirectionValues(_transformObj).bottom;
return this.previusY - new DirectionValues(_transformObj).bottom;
case "top":
return _this.y - new DirectionValues(_transformObj).top;
return this.previusY + new DirectionValues(_transformObj).top;
default:
return GcodeAPI.previusY ?? _this.y;
return this.previusY;
}
}
};
&nbsp;
this.toZ = _transformObj.zIndex
? GcodeAPI.previusZ + _transformObj.zIndex
: _this.z;
: this.obj.z;
}
&nbsp;
getResult() {
Expand All @@ -205,7 +220,7 @@ <h1><a href="../../../../index.html">All files</a> / <a href="index.html">Gcomma
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../../../prettify.js"></script>
<script>
Expand Down
18 changes: 9 additions & 9 deletions gcode/coverage/Gcommands/other/Methods/MoveTo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ <h1><a href="../../../../index.html">All files</a> Gcommands/other/Methods/MoveT
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Statements</span>
<span class='fraction'>45/45</span>
<span class='fraction'>50/50</span>
</div>


<div class='fl pad1y space-right2'>
<span class="strong">92.85% </span>
<span class="strong">100% </span>
<span class="quiet">Branches</span>
<span class='fraction'>13/14</span>
<span class='fraction'>14/14</span>
</div>


Expand All @@ -46,7 +46,7 @@ <h1><a href="../../../../index.html">All files</a> Gcommands/other/Methods/MoveT
<div class='fl pad1y space-right2'>
<span class="strong">100% </span>
<span class="quiet">Lines</span>
<span class='fraction'>45/45</span>
<span class='fraction'>50/50</span>
</div>


Expand Down Expand Up @@ -84,13 +84,13 @@ <h1><a href="../../../../index.html">All files</a> Gcommands/other/Methods/MoveT
<div class="chart"><div class="cover-fill cover-full" style="width: 100%"></div><div class="cover-empty" style="width: 0%"></div></div>
</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="45" class="abs high">45/45</td>
<td data-value="92.85" class="pct high">92.85%</td>
<td data-value="14" class="abs high">13/14</td>
<td data-value="50" class="abs high">50/50</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="14" class="abs high">14/14</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="4" class="abs high">4/4</td>
<td data-value="100" class="pct high">100%</td>
<td data-value="45" class="abs high">45/45</td>
<td data-value="50" class="abs high">50/50</td>
</tr>

</tbody>
Expand All @@ -101,7 +101,7 @@ <h1><a href="../../../../index.html">All files</a> Gcommands/other/Methods/MoveT
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../../../prettify.js"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">Gcommands
<span class="cline-any cline-yes">65x</span>
<span class="cline-any cline-yes">1x</span>
<span class="cline-any cline-neutral">&nbsp;</span></td><td class="text"><pre class="prettyprint lang-js">export default class PositionSpecificy {
constructor(_transformObj) {
this.obj = _transformObj;
constructor(_this) {
this.obj = _this;
this.objKeysArrayReversed = Object.keys(this.obj).reverse();
&nbsp;
this.XpossibleDirection = ["left", "right"];
Expand Down Expand Up @@ -187,7 +187,7 @@ <h1><a href="../../../index.html">All files</a> / <a href="index.html">Gcommands
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
2 changes: 1 addition & 1 deletion gcode/coverage/Gcommands/other/Specificy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h1><a href="../../../index.html">All files</a> Gcommands/other/Specificy</h1>
<div class='footer quiet pad2 space-top1 center small'>
Code coverage generated by
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
at 2022-08-15T12:12:51.198Z
at 2022-08-18T12:32:11.533Z
</div>
<script src="../../../prettify.js"></script>
<script>
Expand Down
Loading

1 comment on commit 8e37cf9

@vercel
Copy link

@vercel vercel bot commented on 8e37cf9 Aug 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

gcode-js – ./

gcode-js-laaouatni.vercel.app
gcode-js-git-main-laaouatni.vercel.app
gcode-js.vercel.app

Please sign in to comment.