Skip to main content

75 posts tagged with "toolkit"

View All Tags

Angular Inputs and Outputs

· 3 min read
Simon Porritt
JsPlumb core team

One of the core concepts when working with components in Angular is that of @Inputs and @Outputs. For instance, maybe you have some component that expects to be told what text to use as its title, and which will output an event when the user clicks a button:

@Component({
selector:"app-my-component",
template:`
<div>
<h1>{{title}}</h1>
<button class="btnEmit" (click)="emitEvent('test')">Click Me</button>
</div>
`
})
export class MyComponent {
@Input() title:string

@Output() outputEvent = new EventEmitter<string>()

emitEvent(value:string) {
this.outputEvent.emit(value)
}
}

From version 5.6.2, JsPlumb's Angular integration now offers a couple of ways of working with these that earlier versions did not support.

Custom connectors

· 14 min read
Simon Porritt
JsPlumb core team
outdated code

The code snippets in this post are only valid for versions of JsPlumb Toolkit prior to 6.9.0. We've disabled the live examples and will be writing an updated version of this post for 6.9.0+ soon.

The jsPlumb Toolkit has five connector types available:

  • Bezier
  • Straight
  • Orthogonal
  • StateMachine
  • Segmented

Together these connectors cater for quite a few use cases, but if none of these are exactly what you need, it is possible to define your own custom connectors. In this post we'll take a look at how to do that, by defining a connector that provides a line taking the form of a triangle wave between its two endpoints.

Version 5.0.0

· 3 min read
Simon Porritt
JsPlumb core team

After several months of development we are pleased to announce that version 5.0.0 of both the Toolkit and Community editions of JsPlumb have recently been released. The 5.x releases are:

  • smaller
  • faster
  • tree shakeable
  • better documented

and offer a simpler, more standardised API - without sacrificing any features. The new codebase for JsPlumb provides a solid platform for us to go on and build the next evolution.

World Cup 2018, part 2

· 5 min read
Simon Porritt
JsPlumb core team

Following on from part 1 of this series, in which we created a visualisation for the progress of each of the group stages, in today's installment we're going to take a look at drawing the post-group stages using JsPlumb's Hierarchical layout.

note

This post is from June 2018 but has been updated to reflect how to code this using version 5.x of JsPlumb. With another world cup around the corner I'm keen to dust this off and be ready to use it again.

World Cup 2018, part 1

· 6 min read
Simon Porritt
JsPlumb core team

It's world cup time again and I've been looking for a good overview of how it's all progressing in the group stages. Being a computer programmer I of course spent a small amount of time looking for one done by someone else, and then decided to just do it myself. With the trusty jsPlumb Toolkit at my disposal I figure it'll be a doddle.

note

This post was originally written in 2018, and at the time I was hoping to re-use this code when the next World Cup came around. For 2022 we've pulled this post into a standalone site - check it out at https://fifaworldcup.jsplumbtoolkit.com