Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

blockly-proceds

Package Overview
Dependencies
Maintainers
0
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blockly-proceds - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "blockly-proceds",
"version": "1.0.4",
"version": "1.0.5",
"description": "A Blockly plugin.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -1,17 +0,5 @@

/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import 'blockly/blocks';
import * as Blockly from 'blockly/core'
// TODO: Edit plugin overview.
/**
* @fileoverview Plugin overview.
*/
// TODO: Rename plugin and edit plugin description.
/**
* Plugin description.
*/
export class Plugin {
export class BlocklyProceds {
/**

@@ -76,4 +64,4 @@ * Constructor for ...

Blockly.Msg.PROCEDURES_ADD_PARAMETER,
function () { /*addParameter(block, 0, nameField)*/ }
);
function () { this.addParameter(block) }
)

@@ -121,21 +109,18 @@ var input = block.appendDummyInput()

addParameter = function (self) {
var argsAmount = self.getVars()
var defaultName = Blockly.Msg.PROCEDURES_PARAMETER + " " + (argsAmount + 1);
var name = this.getAvailableName(self, defaultName);
var id = "INPUTARG" + argsAmount;
addParameter = (self) => {
const argsAmount = self.getVars()
const defaultName = Blockly.Msg.PROCEDURES_PARAMETER + " " + (argsAmount + 1);
const name = this.getAvailableName(self, defaultName);
const id = "INPUTARG" + argsAmount;
/* if (index === undefined) {
self.arguments_.push(name);
self.updateParams_();
var blocks = self.workspace.getAllBlocks();
for (block of blocks)
if (block.type === self.callType_ && block.getProcedureCall() === self.getProcedureDef()[0]) {
block.arguments_.push(name);
block.updateShape_();
}
} */
self.arguments_.push(name);
self.updateParams_();
var createCallButton = new Blockly.FieldImage(
const callers = Blockly.Procedures.getCallers(self.getProcedureDef()[0], self.workspace);
callers.forEach(caller => {
caller.arguments_.push(name);
caller.updateShape_()
})
const createCallButton = new Blockly.FieldImage(
ProcedsBlockly.HAND,

@@ -150,3 +135,3 @@ 16,

var removeParameterButton = new Blockly.FieldImage(
const removeParameterButton = new Blockly.FieldImage(
ProcedsBlockly.MINUS,

@@ -173,4 +158,4 @@ 16,

var nameField = new Blockly.FieldTextInput(name, function (newName) {
var oldName = self.getVars()[argsAmount];
const nameField = new Blockly.FieldTextInput(name, function (newName) {
const oldName = self.getVars()[argsAmount];

@@ -182,3 +167,2 @@ if (oldName !== newName)

var callers = Blockly.Procedures.getCallers(self.getProcedureDef()[0], self.workspace);
callers.forEach(caller => {

@@ -185,0 +169,0 @@ caller.arguments_ = caller.arguments_.map(argName => argName === oldName ? newName : argName)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc