-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from boostcampwm-2024/feature/designWhiteboard…
…Object [Feature] 화이트보드 오브젝트, 오브젝트 뷰 설계
- Loading branch information
Showing
5 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// WhiteboardObject.swift | ||
// Domain | ||
// | ||
// Created by 이동현 on 11/12/24. | ||
// | ||
import Foundation | ||
|
||
public class WhiteboardObject { | ||
public let id: UUID | ||
public var position: CGPoint | ||
public var size: CGSize | ||
|
||
public init( | ||
id: UUID, | ||
position: CGPoint, | ||
size: CGSize | ||
) { | ||
self.id = id | ||
self.position = position | ||
self.size = size | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Presentation/Presentation/Sources/Whiteboard/Factory/WhiteboardObjectViewFactoryable.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// | ||
// WhiteboardObjectViewFactoryable.swift | ||
// Presentation | ||
// | ||
// Created by 이동현 on 11/12/24. | ||
// | ||
import Domain | ||
|
||
protocol WhiteboardObjectViewFactoryable { | ||
func create(with whiteboardObject: WhiteboardObject) -> WhiteboardObjectView | ||
} |
19 changes: 19 additions & 0 deletions
19
Presentation/Presentation/Sources/Whiteboard/View/WhiteboardObjectView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// WhiteboardObjectView.swift | ||
// Presentation | ||
// | ||
// Created by 이동현 on 11/12/24. | ||
// | ||
import Domain | ||
import UIKit | ||
|
||
class WhiteboardObjectView: UIView { | ||
init(whiteboardObject: WhiteboardObject) { | ||
let frame = CGRect(origin: whiteboardObject.position, size: whiteboardObject.size) | ||
super.init(frame: frame) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
super.init(coder: coder) | ||
} | ||
} |