Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
eonist committed Sep 28, 2017
1 parent 3efa828 commit 5593ccc
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Element/ui/Element.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class Element:InteractiveView,ElementKind {
var skinState:String {get {return ""}set {skin?.setSkinState(newValue)}}/*Enables overriding of skinState*///TODO: ⚠️️ this should be an array, and rename to skinState, and try to get rid of the default none state
var skin:Skinable?
var uiState:UIState = (isDisabled:false,isFocused:false)

init(size:CGSize = CGSize(0,0),id:String? = nil){
self.id = id
var size = size//temp fix, until you remove NaN initializers
Expand All @@ -42,6 +41,7 @@ class Element:InteractiveView,ElementKind {
* Draws the skin (aka graphics)
*/
func resolveSkin() {
// Swift.print("skinSize: " + "\(skinSize)")
self.skin = SkinResolver.skin(self)//don't inline these 2 lines, as you need the ref to skin in the addSubView excecution
self.addSubview(self.skin as! Skin)
}
Expand Down
1 change: 1 addition & 0 deletions src/Element/ui/list/utils/MoverGroup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Foundation
@testable import Utils
/**
* TODO: ⚠️️ make this a struct?
* TODO: ⚠️️ ContentSize and maskSize should be method refs, so that they can be updated from parent 👈
*/
struct MoverGroup{//rename to ElasticMoverGroup
var xMover:RubberBand, yMover:RubberBand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ScrollerFastList5:FastList5 {
/**
* Overrides the native scrollWheel method (this is the heart of scrolling)
*/
override open func scrollWheel(with event: NSEvent) {
override open func scrollWheel(with event:NSEvent) {
// Swift.print("ScrollerFastList5.scrollWheel")
scrollHandler.scroll(event)
super.scrollWheel(with: event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class ElasticScrollerFastListHandler:ScrollerFastListHandler,ElasticDecorator {
* NOTE: Basically when you enter your scrollWheel gesture
*/
override func onScrollWheelEnter(){
Swift.print("onScrollWheelEnter")
// Swift.print("onScrollWheelEnter")
//moverGroup.isDirectlyManipulating = true/*Toggle to directManipulationMode*/ //this was moved
moverGroup.stop()
moverGroup.hasStopped = true/*set the stop flag to true*/
Expand All @@ -29,7 +29,7 @@ class ElasticScrollerFastListHandler:ScrollerFastListHandler,ElasticDecorator {
* NOTE: Basically when you release your scrollWheel gesture
*/
override func onScrollWheelExit(){
Swift.print("onScrollWheelExit")
// Swift.print("onScrollWheelExit")
//Swift.print("iterimScroll.prevScrollingDelta: " + "\(iterimScroll.prevScrollingDelta)")
moverGroup.hasStopped = false
moverGroup.value = moverGroup.result
Expand All @@ -39,7 +39,7 @@ class ElasticScrollerFastListHandler:ScrollerFastListHandler,ElasticDecorator {
* NOTE: Basically when you release your scrollWheel gesture
*/
override func onScrollWheelMomentumBegan(_ event:NSEvent) {
Swift.print("onScrollWheelMomentumBegan")
// Swift.print("onScrollWheelMomentumBegan")
moverGroup.hasStopped = false/*Reset this value to false, so that the FrameAnimatior can start again*/
//moverGroup.isDirectlyManipulating = false
moverGroup.value = moverGroup.result/*Copy this back in again, as we used relative friction when above or bellow constraints*/
Expand Down
4 changes: 2 additions & 2 deletions src/Element/ui/list/v5/list/fast/FastList5.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class FastList5:ProgressableView5,FastListable5{
}
override func getClassType() -> String {
let type:String = dir == .ver ? "List" : "VList"//<--VList really? that is actually wrong! should be HList
Swift.print("getClassType· \(type) ")
// Swift.print("getClassType· \(type) ")
return type
}
required init(coder: NSCoder) {fatalError("init(coder:) has not been implemented")}
Expand All @@ -87,7 +87,7 @@ extension FastList5{
* TODO: ⚠️️ It could be that you could make this method more effective. say if only data changes!?!?
*/
func onDataProviderEvent(_ event:DataProviderEvent){
Swift.print("FastList3.onDataProviderEvent: " + "\(event)")
Swift.print("FastList5.onDataProviderEvent: " + "\(event)")
Swift.print("event.startIndex: " + "\(event.startIndex)")
alignContentContainer(event)/*aligns the container*/
let range:Range<Int> = visibleItemRange.start..<Swift.min(visibleItemRange.end,dp.count)
Expand Down
2 changes: 1 addition & 1 deletion src/Element/ui/other/view/v5/ContainerView5.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ContainerView5:Element,Containable5 {

extension ContainerView5 {//private maybe?
func createContentContainer() -> Container {
Swift.print("self.skinSize: " + "\(self.skinSize)")
// Swift.print("self.skinSize: " + "\(self.skinSize)")
return self.addSubView(Container(size:self.skinSize,id:"lable"))//<-- ⚠️️ misspelled
}
}
Expand Down

0 comments on commit 5593ccc

Please sign in to comment.