internal static CircleOverlayEntryJsModel CreateFromDomainModel(CircleOverlayEntry circleDomain) { var model = new CircleOverlayEntryJsModel { Center = circleDomain.Center, Size = circleDomain.Size }; BaseOverlayEntryJsModel.MapBasePropertiesFromDomainModel(circleDomain, model); return(model); }
public static MapOverlayJsModel CreateFromDomainModel(MapOverlay domainModel) { var model = new MapOverlayJsModel(); model.Id = domainModel.Id; model.Name = domainModel.Name; model.Zones = domainModel.Entries.Where(e => e is ZoneOverlayEntry).Cast <ZoneOverlayEntry>().Select(z => ZoneOverlayEntryJsModel.CreateFromDomainModel(z)).ToList(); model.Circles = domainModel.Entries.Where(e => e is CircleOverlayEntry).Cast <CircleOverlayEntry>().Select(z => CircleOverlayEntryJsModel.CreateFromDomainModel(z)).ToList(); model.Cameras = domainModel.Entries.Where(e => e is CameraOverlayEntry).Cast <CameraOverlayEntry>().Select(z => CameraOverlayEntryJsModel.CreateFromDomainModel(z)).ToList(); return(model); }
public async Task ShowTagInfo(JsModel.CircleOverlayEntryJsModel circle, SvgComponentEvent e) { await Vm.ShowTagInfo(circle, e.ClientX.Value, e.ClientY.Value); }