pile_nav_new/lib/pages/aim_point/aimpointController.dart

36 lines
1.0 KiB
Dart
Raw Normal View History

2024-08-31 17:57:19 +08:00
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:scence_map/record_entity.dart';
class AimPointerController extends GetxController {
2024-09-03 18:05:49 +08:00
// var isNomal = true.obs;
2024-08-31 17:57:19 +08:00
//左下圆
var sightOffset = const Offset(3, 3).obs;
var sightOffsetInit = const Offset(0, 0).obs;
var sightInit = const Offset(0, 0).obs;
// var lastSightOffset = const Offset(0, 0).obs; // 新增变量,用于存储上一次手指离开时的位置
var isCardVisible = false.obs; // 控制卡片是否可见
RecordEntity? selectedPilePoint;
var initDx = 0.0.obs;
var isFirst = true.obs;
var visualList = [].obs;
var plot = 2.0.obs;
var scale = 0.75.obs;
var cardWidth = 0.0.obs;
2024-09-03 18:05:49 +08:00
var x = 0.0.obs;
var y = 0.0.obs;
2024-08-31 17:57:19 +08:00
var positionUpdate = 0.obs;
int lastManualTapTime = 0;
int lastCloseTapTime = 0;
reset() {
sightOffset.value = const Offset(3, 3);
sightOffsetInit.value = const Offset(0, 0);
sightInit.value = const Offset(0, 0);
initDx.value = 0.0;
update();
}
}