1
0
Fork 0

fire: Removed unneeded box calls and fixed some formatting

This commit is contained in:
Joost De Cock 2018-08-18 10:50:10 +02:00
parent 268e535b37
commit 2f5e17d07d
26 changed files with 25 additions and 69 deletions

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathAttrs = {
draft: function(part) {

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathClone = {
draft: function(part) {

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathEnd = {
draft: function(part) {

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathJoin = {
draft: function(part) {

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathLength = {
draft: function(part) {

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathOps = {
draft: function(part) {
// prettier-ignore
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
box(part);
points.A = new Point(10, 10)
.attr('data-text', 'Move to point A')
.attr('data-text-class', 'center text-xs');

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathShiftAlong = {
draft: function(part) {
@ -19,11 +18,13 @@ var pathShiftAlong = {
points.X1 = paths.example.shiftAlong(20)
.attr('data-text', 'Shifted 2cm along this path')
.attr('data-text-class', 'center');
.attr('data-text', "Shifted 2cm\nalong this path")
.attr('data-text-class', 'center')
.attr('data-text-lineheight', 6);
points.X2 = paths.example.shiftAlong(90)
.attr('data-text', 'Shifted 9cm along this path')
.attr('data-text-class', 'center');
.attr('data-text', "Shifted 9cm\nalong this path")
.attr('data-text-class', 'center')
.attr('data-text-lineheight', 6);
snippets.Xl = new Snippet('x', points.X1);
snippets.X2 = new Snippet('x', points.X2);

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathShiftFractionAlong = {
draft: function(part) {
@ -19,11 +18,13 @@ var pathShiftFractionAlong = {
points.X1 = paths.example.shiftFractionAlong(0.2)
.attr('data-text', 'Shifted 20% along this path')
.attr('data-text-class', 'center');
.attr('data-text', "Shifted 20%\nalong this path")
.attr('data-text-class', 'center')
.attr('data-text-lineheight', 6);
points.X2 = paths.example.shiftFractionAlong(0.9)
.attr('data-text', 'Shifted 90% along this path')
.attr('data-text-class', 'center');
.attr('data-text', "Shifted 90%\nalong this path")
.attr('data-text-class', 'center')
.attr('data-text-lineheight', 6);
snippets.Xl = new Snippet('x', points.X1);
snippets.X2 = new Snippet('x', points.X2);

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathStart = {
draft: function(part) {

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointAngle = {
draft: function(part) {
// prettier-ignore
let {Point, points, Path, paths, Snippet, snippets} = part.shorthand();
box(part, 80, 80);
points.sun = new Point(40, 40);
points.moon1 = new Point(70, 40).attr('data-text', '0').attr('data-text-class', 'text-xl');
points.moon2 = new Point(40, 10).attr('data-text', 90).attr('data-text-class', 'text-xl');

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointDist = {
draft: function(part) {
// prettier-ignore
let {Point, points, Snippet, snippets, macro} = part.shorthand();
box(part);
points.from = new Point(10, 10);
points.to = new Point(90, 40);

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointDx = {
draft: function(part) {
// prettier-ignore
let {Point, points, Snippet, snippets, macro} = part.shorthand();
box(part);
points.from = new Point(10, 10);
points.to = new Point(90, 40);

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointDy = {
draft: function(part) {
// prettier-ignore
let {Point, points, Snippet, snippets, macro} = part.shorthand();
box(part);
points.from = new Point(10, 10);
points.to = new Point(90, 40);

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointFlipX = {
draft: function(part) {
// prettier-ignore
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
box(part);
points.top = new Point(50, 10);
points.out1 = new Point(70, 30);
points.in1 = new Point(55, 35);

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointFlipX = {
draft: function(part) {
// prettier-ignore
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
box(part);
points.start = new Point(0, 50);
points.churchTowerWallLeft = new Point(10, 50);
points.churchTowerRoofLeft = new Point(10, 30);

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointRotate = {
draft: function(part) {
// prettier-ignore
let {Point, points, Path, paths, Snippet, snippets} = part.shorthand();
box(part, 80, 80);
points.sun = new Point(40, 40);
snippets.sun = new Snippet("notch", points.sun);
points.moon = new Point(70, 40);

View file

@ -1,14 +1,13 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointShift = {
draft: function(part) {
// prettier-ignore
let {Point, points, Snippet, snippets, macro} = part.shorthand();
box(part);
points.A = new Point(90, 40).attr('data-text', 'Point A');
points.A = new Point(90, 40)
.attr('data-text', 'Point A')
.attr('data-text-class', 'right');
points.B = points.A.shift(155, 70)
.attr('data-text', "Point B is point A shifted 7cm\nat a 155 degree angle")
.attr('data-text-lineheight', 6);

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointShiftFractionTowards = {
draft: function(part) {
// prettier-ignore
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
box(part);
points.A = new Point(90, 70).attr('data-text', 'Point A');
points.B = new Point(10, 10).attr('data-text', 'Point B');
points.C = points.A.shiftFractionTowards(points.B, 0.5)

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointShiftOutwards = {
draft: function(part) {
// prettier-ignore
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
box(part);
points.A = new Point(90, 70).attr('data-text', 'Point A');
points.B = new Point(10, 10).attr('data-text', 'Point B');
points.C = points.A.shiftOutwards(points.B, 30)

View file

@ -1,13 +1,10 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pointShiftTowards = {
draft: function(part) {
// prettier-ignore
let {Point, points, Path, paths, Snippet, snippets, macro} = part.shorthand();
box(part);
points.A = new Point(90, 70).attr('data-text', 'Point A');
points.B = new Point(10, 10).attr('data-text', 'Point B');
points.C = points.A.shiftTowards(points.B, 35)

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var pathOffset = {
draft: function(part) {

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var utilsBeamCrossesX = {
draft: function(part) {

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var utilsBeamsCross = {
draft: function(part) {

View file

@ -1,5 +1,4 @@
import freesewing from "freesewing";
import { box } from "./shared";
var utilsLinesCross = {
draft: function(part) {