public override void Build(SpaceDrawing e) { var cur = new InternalStyle(); cur.AddChild(e.OuterElementStyle); e.OuterElementStyle = cur; var em = e.OuterElementStyle; em.Padding = string.Format("{0} {0} {0} {0}", ( Radius ).px()); em.BackgroundColor = Color; em.Border = "solid 2px black"; /// Window.Alert("good1"); em.Left = ( em.Left.nopx() - Radius ).px(); em.Top = ( em.Top.nopx() - Radius ).px(); em.BorderRadius = 15.0.px(); em.BoxShadow = "4px 4px 2px #333"; }
private SpaceDrawing findSpace(CardGameTableSpace space) { string id = "dv_space_" + space.Name; if (spaces[id] != null) return spaces[id]; else { var sp = Document.CreateElement("div"); sp.ID = id; sp.Style.Position = "absolute"; jQuery.Select("#dvGame").Append(sp); return spaces[id] = new SpaceDrawing(sp); } }
public override void TearDown(SpaceDrawing em) { base.TearDown(em); }
public override void Build(SpaceDrawing m) { if (Style == null) return; m.OuterElementStyle.BackgroundColor = Style.OuterStyle.BackColor; }
public virtual void Build(SpaceDrawing m) { ///Window.Alert("bad1"); }
public virtual void TearDown(SpaceDrawing em) { ///Window.Alert("bad2"); }
public override void TearDown(SpaceDrawing e) { /* var em = e.OuterElementStyle; /// Window.Alert("good2"); double paddingRadiusL = em.PaddingLeft.nopx(); double paddingRadiusT = em.PaddingTop.nopx(); em.Left = ( em.Left.nopx() - em.PaddingLeft.nopx() ).px(); em.Top = ( em.Top.nopx() - em.PaddingTop.nopx() ).px(); for (int i = 0; i < e.OuterElement.ChildNodes.Length; i++) { var childNode = e.OuterElement.ChildNodes[i]; if (childNode.TagName == "DIV") { childNode.Style.Left = (childNode.Style.Left.nopx() + paddingRadiusL).px(); childNode.Style.Top = (childNode.Style.Top.nopx() + paddingRadiusT).px(); } } */ }