Skip to content

Instantly share code, notes, and snippets.

@howtomakeaturn
howtomakeaturn / gist:4855a886363085d3067f2f3cbbf36c72
Last active March 22, 2022 07:34
fabricjs-TextboxWithPadding.md

create the new type

fabric.TextboxWithPadding = fabric.util.createClass(fabric.Textbox, {
  type: 'textboxwithpadding',

  toObject: function() {
    return fabric.util.object.extend(this.callSuper('toObject'), {
      backgroundColor: this.get('backgroundColor'),
      padding: this.get('padding'),

重點,不要開放式的隨興填答. 也不要 judge 案主或是工程師. 重點或許是「描述清楚 priority」,大家都知所取捨


這個專案,工程師若以兼職的方式接案,每月結 1 or 2 次帳,時薪在哪個區間符合您的需求?

(選項多一點,或是少一點呢?)

  • 新台幣0元~250元
  • 新台幣250元~500元
@howtomakeaturn
howtomakeaturn / conver-blob-to-base64.js
Last active January 30, 2021 03:06
conver-blob-to-base64.js
const convert = (blob) => {
var reader = new FileReader();
return new Promise((resolve, reject) => {
reader.onloadend = () => {
var base64data = reader.result;
resolve(base64data);
}
reader.readAsDataURL(blob);
});
@howtomakeaturn
howtomakeaturn / example.js
Created November 21, 2020 15:43
Fabric.js subclass working example, supporting clone - Textbox with background color and padding
fabric.TextboxWithPadding = fabric.util.createClass(fabric.Textbox, {
type: 'textboxwithpadding',
toObject: function() {
return fabric.util.object.extend(this.callSuper('toObject'), {
backgroundColor: this.get('backgroundColor'),
padding: this.get('padding'),
});
},
@howtomakeaturn
howtomakeaturn / example.js
Last active September 13, 2023 04:23
Fabric.js subclass working example, supporting clone - LabeledRect
fabric.LabeledRect = fabric.util.createClass(fabric.Rect, {
type: 'labeledRect',
toObject: function() {
return fabric.util.object.extend(this.callSuper('toObject'), {
label: this.get('label')
});
},

title test

first line second line no break third line no break


first line

changeOptionValue(optionIndex, valueIndex, newValue) {
const state = this.state;
const newState = {
...state,
options: state.options.map((option, i) =>
i === optionIndex ?
{ ...option, values: option.values.map((value, ii) =>
ii === valueIndex ?
newValue : value
import React from 'react';
class Loading extends React.Component {
render() {
return (
<div style={{
position: "fixed",
width: "100%",
height: "100%",
top: "0",
@howtomakeaturn
howtomakeaturn / test.md
Last active February 10, 2019 13:35
test.md

header one

header two

so bold text


the html part