optimise
This commit is contained in:
@@ -27,7 +27,7 @@ extension VehicleMonitorVideoController {
|
||||
self?.view.dd_showHUD()
|
||||
})
|
||||
.flatMapLatest {[weak self] _ in
|
||||
return RQ.getRtspChannel(prameters: RtspChannelParameters(vehicleId: 203656))
|
||||
return RQ.getRtspChannel(prameters: RtspChannelParameters(vehicleId: (self?.vehicleId)!))
|
||||
}
|
||||
.observe(on: MainScheduler.instance)
|
||||
.do(onNext: {[weak self] _ in
|
||||
|
||||
@@ -251,19 +251,18 @@ extension VehicleMonitoringController : DDMAMapViewDelegate {
|
||||
}
|
||||
|
||||
var vehicleMonitoringPointAnnotationNameInset = vehicleMonitoringPointAnnotationNameLeftInset + vehicleMonitoringPointAnnotationNameRightInset
|
||||
// if model?.terminalType == .GPS {
|
||||
// annotationView?.cameraBackgroundImageView.isHidden = false
|
||||
// annotationView?.nameLabel.snp.updateConstraints({ make in
|
||||
// make.right.equalToSuperview().offset(-auto(35))
|
||||
// })
|
||||
// }else{
|
||||
// annotationView?.cameraBackgroundImageView.isHidden = true
|
||||
// annotationView?.nameLabel.snp.updateConstraints({ make in
|
||||
// make.right.equalToSuperview().offset(-auto(5))
|
||||
// })
|
||||
// vehicleMonitoringPointAnnotationNameInset = vehicleMonitoringPointAnnotationNameInset - auto(30)
|
||||
// }
|
||||
|
||||
if model?.terminalType == .GPS {
|
||||
annotationView?.cameraBackgroundImageView.isHidden = false
|
||||
annotationView?.nameLabel.snp.updateConstraints({ make in
|
||||
make.right.equalToSuperview().offset(-auto(35))
|
||||
})
|
||||
}else{
|
||||
annotationView?.cameraBackgroundImageView.isHidden = true
|
||||
annotationView?.nameLabel.snp.updateConstraints({ make in
|
||||
make.right.equalToSuperview().offset(-auto(5))
|
||||
})
|
||||
vehicleMonitoringPointAnnotationNameInset = vehicleMonitoringPointAnnotationNameInset - auto(30)
|
||||
}
|
||||
let contentSizeH = annotationView?.contentLabel.sizeThatFits(CGSize(width: vehicleMonitoringPointAnnotationW, height: 1000)).height ?? 0
|
||||
var nameSizeH = annotationView?.nameLabel.sizeThatFits(CGSize(width: vehicleMonitoringPointAnnotationW - vehicleMonitoringPointAnnotationNameInset, height: 1000)).height ?? 0
|
||||
if nameSizeH < vehicleMonitoringPointAnnotationNameAtLeastH {
|
||||
|
||||
Reference in New Issue
Block a user