Giter Club home page Giter Club logo

Comments (8)

akevalion avatar akevalion commented on June 2, 2024

We have two new interactions for this issue
image

image

	| v sb label box |
	v := RSView new.
	label := RSShapeBuilder label.
	box := RSShapeBuilder box
		border: TSBorder new;
		cornerRadius: (TSCornerRadius new right: 10);
		extent: [ :lb | lb extent + 5 ].
	sb := RSShapeBuilder composite
		interactionDo: #draggable;
		shapes: [ :m | | l |
			l := label elementOn: m.
			TSGroup with: (box elementOn: l) with: l].
	v addAll: (sb elementsOn: ArrayedCollection withAllSubclasses).
	v @ RSControlsView.
	RSEdgeBuilder orthoHorizontal
		markerEnd: (TSMarker new 
			offsetRatio: 0.1;
			shape: (RSShapeBuilder triangle 
				color: Color red;
				size: 10;
				element));
		attachPoint: RSHorizontalAttachPoint new; 
		border: (TSBorder new);
		view: v;
		elements: v elements;
		connectFrom: #superclass.
	"v edges @ RSKeepBorderWidthRatio. Not necessary since all edges shares the same border"
	
	v edges first @ RSKeepBorderWidthRatio. 
	v edges first @ RSKeepMarkersSizeRatio.
	RSHorizontalTreeLayout new on: v elements.
	v open setLabel: 'Horizontal Tree'

This interactions allow to the elements keep the same size. The name of this new classes can be renamed to better names

image

from roassal3.

tinchodias avatar tinchodias commented on June 2, 2024

Great, I will check it.

from roassal3.

bergel avatar bergel commented on June 2, 2024

Looks very good!
@tinchodias I am okay with closing this issue. What do you think?

from roassal3.

tinchodias avatar tinchodias commented on June 2, 2024

Now that I see how it looks, I'd like to have this effect only when user zooms in but not when you zoom out (arrows become too large). Milton told me this was easy to do.

Also, the use case where I wanted this feature is Hunter, where the nodes have no text... I think it will look good there.

from roassal3.

bergel avatar bergel commented on June 2, 2024

@akevalion Can you check please?

from roassal3.

tinchodias avatar tinchodias commented on June 2, 2024

Now I think we can close this issue.

from roassal3.

tinchodias avatar tinchodias commented on June 2, 2024

Doing it...

from roassal3.

akevalion avatar akevalion commented on June 2, 2024

There is a new max and min value for this kind of interactions

  • RSKeepBorderWidthRatio
  • RSKeepMarkersSizeRatio

from roassal3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.