Serenity.LazyLoadHelper.ExecuteOnceWhenShown C# (CSharp) Method

ExecuteOnceWhenShown() public static method

public static ExecuteOnceWhenShown ( jQueryObject element, System.Action callback ) : void
element jQueryObject
callback System.Action
return void
        public static void ExecuteOnceWhenShown(jQueryObject element, Action callback)
        {
        }

Usage Example

Exemplo n.º 1
0
        public GoogleMap(jQueryObject container, GoogleMapOptions opt)
            : base(container, opt)
        {
            var center = new LatLng(options.Latitude ?? 0, options.Longitude ?? 0);

            map = new Map(container[0], new MapOptions
            {
                Center      = center,
                MapTypeId   = options.MapTypeId ?? MapTypeId.roadmap,
                Zoom        = options.Zoom ?? 15,
                ZoomControl = true
            });

            if (options.MarkerTitle != null)
            {
                new Marker(new MarkerOptions {
                    Position = new LatLng(
                        options.MarkerLatitude ?? options.Latitude ?? 0,
                        options.MarkerLongitude ?? options.Longitude ?? 0),
                    Map       = map,
                    Title     = options.MarkerTitle,
                    Animation = Animation.Drop
                });
            }

            LazyLoadHelper.ExecuteOnceWhenShown(container, () =>
            {
                GEvent.Trigger(map, "resize");
                map.SetCenter(center); // in case it wasn't visible (e.g. in dialog)
            });
        }
All Usage Examples Of Serenity.LazyLoadHelper::ExecuteOnceWhenShown