Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/hw_lite/PingpongG1Lite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hw_lite/PingpongG2Lite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hw_lite/PingpongG3Lite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hw_lite/PingpongG4Lite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/hw_lite/PingpongPracticalartsLite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/class/variable/listVariable.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ListVariable extends Variable {
}

_showListFullWarning() {
Entry.toast?.alert(
Entry.toast?.warning(
Lang?.Workspace?.list_cant_add_item || 'Warning',
Lang?.Workspace?.list_max_length_exceeded ||
`You can add up to ${this.LIST_MAX_LENGTH} items to a list.`
Expand Down
4 changes: 2 additions & 2 deletions src/class/variable_container.js
Original file line number Diff line number Diff line change
Expand Up @@ -3053,7 +3053,7 @@ Entry.VariableContainer = class VariableContainer {

if (value >= limitValue) {
value = limitValue;
Entry.toast?.alert(
Entry.toast?.warning(
Lang?.Workspace?.list_cant_add_item || 'Warning',
Lang?.Workspace?.list_max_length_exceeded ||
'You can add up to 5,000 items to a list.'
Expand Down Expand Up @@ -3084,7 +3084,7 @@ Entry.VariableContainer = class VariableContainer {
const selectedLength = array_.length;

if (selectedLength >= limitValue) {
Entry.toast?.alert(
Entry.toast?.warning(
Lang?.Workspace?.list_cant_add_item || 'Warning',
Lang?.Workspace?.list_max_length_exceeded ||
'You can add up to 5,000 items to a list.'
Expand Down
15 changes: 7 additions & 8 deletions src/playground/block_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Entry.BlockView = class BlockView {
}

this.isInBlockMenu = this.getBoard() instanceof Entry.BlockMenu;
this.mouseHandler = function (e) {
this.mouseHandler = function(e) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ·

Suggested change
this.mouseHandler = function(e) {
this.mouseHandler = function (e) {

(_.result(that.block.events, 'mousedown') || []).forEach((fn) => {
if (Entry.documentMousedown) {
Entry.documentMousedown.notify(e);
Expand Down Expand Up @@ -608,7 +608,7 @@ Entry.BlockView = class BlockView {
const mouseDownCoordinate = this.mouseDownCoordinate;
const diff = Math.sqrt(
Math.pow(mouseEvent.pageX - mouseDownCoordinate.x, 2) +
Math.pow(mouseEvent.pageY - mouseDownCoordinate.y, 2)
Math.pow(mouseEvent.pageY - mouseDownCoordinate.y, 2)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ····

Suggested change
Math.pow(mouseEvent.pageY - mouseDownCoordinate.y, 2)
Math.pow(mouseEvent.pageY - mouseDownCoordinate.y, 2)

);
if (this.dragMode == Entry.DRAG_MODE_DRAG || diff > Entry.BlockView.DRAG_RADIUS) {
const blockView = this;
Expand Down Expand Up @@ -1019,9 +1019,8 @@ Entry.BlockView = class BlockView {
magnet = this.magnet.previous;
const dragHeight = dragBlock.getBelowHeight();
const nextX = _get(dragBlock, 'magnet.next.x');
transform = `translate(${pos.scaleX + magnet.x - nextX},${
pos.scaleY + magnet.y - dragHeight
})`;
transform = `translate(${pos.scaleX + magnet.x - nextX},${pos.scaleY + magnet.y - dragHeight

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [eslint] <max-len> reported by reviewdog 🐶
This line has a length of 108. Maximum allowed is 100.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ⏎····················

Suggested change
transform = `translate(${pos.scaleX + magnet.x - nextX},${pos.scaleY + magnet.y - dragHeight
transform = `translate(${pos.scaleX + magnet.x - nextX},${
pos.scaleY + magnet.y - dragHeight

})`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Delete ····

Suggested change
})`;
})`;

}

const $shadow = $(shadow);
Expand Down Expand Up @@ -1642,7 +1641,7 @@ Entry.BlockView = class BlockView {
halfWidth = 20;
}
return {
getBoundingClientRect: function () {
getBoundingClientRect: function() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ·

Suggested change
getBoundingClientRect: function() {
getBoundingClientRect: function () {

const coord = this.getAbsoluteCoordinate();
const boardOffset = this._board.relativeOffset;
const magnet = this.magnet[selector];
Expand Down Expand Up @@ -1767,7 +1766,7 @@ Entry.BlockView = class BlockView {
canvas.height = height;
const ctx = canvas.getContext('2d');

img.onload = function () {
img.onload = function() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ·

Suggested change
img.onload = function() {
img.onload = function () {

try {
ctx.drawImage(img, 0, 0, width, height);
const data = canvas.toDataURL('image/png');
Expand All @@ -1780,7 +1779,7 @@ Entry.BlockView = class BlockView {
}
};

img.onerror = function () {
img.onerror = function() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚫 [eslint] <prettier/prettier> reported by reviewdog 🐶
Insert ·

Suggested change
img.onerror = function() {
img.onerror = function () {

return reject('error occured');
};
img.src = src;
Expand Down
Loading
Loading