Comments (10)
We should import RTAlignment
from Roassal2, and maybe, define some utility methods, in the same spirit of TRConstraint
from roassal3.
There is a version of RTAligment and RTResize that works pretty well on Roassal3
from roassal3.
But we need RSLocate
...
from roassal3.
We have RSLocate
| v shape e1 e2 |
v := RSView new.
shape := RSShapeBuilder box
@ RSDraggable;
onElement;
color: TSColorPalette sequential blues3;
size: 100.
e1 := shape element.
"e1 @ RSDraggable."
e2 := shape element.
e2 size: 20.
RSLocate new
padding: 1;
fix: e1;
movable: e2;
inner;
bottom;
left;
stick.
v addAll: {e1. e2}.
v @ RSControlsView.
v open
from roassal3.
Looks really good!
Do you think that RSLocate
can be a subclass of RSAbstractElementHandling
?
from roassal3.
I do not thing so, RSLocate do es not need any method of that class
from roassal3.
But RSAbstractElementHandling
has fixedElement:
, and you have it again in RSLocate
from roassal3.
example10Locate
<script: 'self new example10Locate'>
| v shape e1 e2 |
v := RSView new.
shape := RSShapeBuilder box
@ RSDraggable;
onElement;
color: TSColorPalette sequential blues3;
size: 100.
e1 := shape element.
"e1 @ RSDraggable."
e2 := shape element.
e2 size: 20.
RSLocate new
padding: 1;
inner;
bottom;
left;
stick: e2 on: e1.
v addAll:{e1. e2}.
v @ RSControlsView.
v open
I have change the code of RSLocate, fixedElement and movableElement are not instance variables in RSLocate, instead they are arguments in methods stick:on:
and move:on
. The main reason to change that is because RSLocate can be use in a lot of elements and not only in a couple. This is useful for RSLabeled, because RSLabeled uses an instance of RSLotate, you can use the same instance for multiple elements
from roassal3.
I have added a new animated example of this
Click on buttons to modify RSLocate.
click on big box to modify the padding of RSLocate
from roassal3.
Well done!
from roassal3.
Related Issues (20)
- RSHighlightable examples do not work HOT 1
- RSAbstractLine uses RSTPositionable, even though position can't be set HOT 2
- from discord whenPresenterResized HOT 2
- All composites disappear based on camera position HOT 2
- Strange behavior with method "from:" and "to:" of RSLine class HOT 2
- Bug in example03LinePath HOT 2
- May be RSAnimationLoopEvent comes too hearly... HOT 4
- Bug method repeat of RSTransitionAnimation when to: method used HOT 1
- RSLayoutExamples>>example23Roassal3CommitsWithTimeGaps not understand #repositoryNamed: HOT 5
- RSAbstractTick crashes when creating a bar plot with only one value HOT 1
- Error in RSExporterExamples>>example06SVGExport HOT 1
- update RSElasticBoxInteraction
- RSMultilineLabelBuilder with RSWrapStrategy produces empty lines HOT 1
- Cleanup: Condense Roassal3 packages HOT 1
- Double click processing for roassal
- create ghostShape
- Imprecise mouse event recognition of RSBezier
- Control points do not update on from/to extent change
- graphviz attach point
- RSChart HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roassal3.