Shared Smalltalk Workspace http://ws.stfx.eu/

http://ws.stfx.eu/http://ws.stfx.eu/

Doit | Raw | Getting Started Workspace | Home | New
| v diameter avatar daysOrbit weeksOrbit monthsOrbit  epicycle impactData dummyData weeksScale |

v := RTView new.
avatar := (RTBitmap new form: RTIcon roassal) element.
avatar @ RTDraggable.
diameter := 55.
daysOrbit := (RTEllipse new 
						size: diameter*7; 
						color: Color white) element.
weeksOrbit := (RTEllipse new 
						size: diameter*14; 
						color: Color lightGray) element.
monthsOrbit := (RTEllipse new 
						size: diameter*21; 
						color: Color gray) element.						

weeksScale := RTArc new
	innerRadius: [ :i | i * (25) ];
	externalRadius: [ :i | (i * (25)) + 1];
	alphaAngle: 0;
	betaAngle: 360;
	color: Color lightGray.


v add: monthsOrbit.
v add: weeksOrbit.
v add: daysOrbit.
v addAll: (weeksScale elementsOn: (1 to: 7) ).
v add: avatar.

dummyData := Dictionary new.
dummyData at: 'retweeters' put: '5'; at: 'reach' put: '10k'.

"impactData := Tweet new impactFor: 'https://twitter.com/offrayLC/status/599196718152949760'."
impactData := dummyData.

epicycle := Tweet new labeledCircleSized: diameter upperLabel: (impactData at: 'retweeters') bottomLabel: (impactData at: 'reach') inView: v.
epicycle @ RTDraggable.


v view canvas focusOnCenterScaled.
THIS SOFTWARE SERVICE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR OR SERVICE PROVIDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE SERVICE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE SERVICE.