Ejemplo n.º 1
0
        public void element_splitted_twice_views_corrects_parts_of_element()
        {
            var element = new LayoutedElement(new Box(), Children.Empty) { ForcedInnerHeight = 40.cm() };
            var result1 = element.Split(15.cm(), 15.cm()).Result;
            var result2 = result1[1].Split(15.cm(), 15.cm()).Result;

            result1[0].ViewportTop.ShouldBe(0.cm());
            result1[1].ViewportTop.ShouldBe(15.cm());
            result2[0].ViewportTop.ShouldBe(result1[1].ViewportTop);
            result2[1].ViewportTop.ShouldBe(30.cm());
        }
Ejemplo n.º 2
0
        public void split_element_has_original_layouted_element_height_and_width_stored()
        {
            var element = new LayoutedElement(new Box(), Children.Empty) { ForcedInnerHeight = 6.cm(), ForcedInnerWidth = 6.cm() };
            var result = element.Split(15.cm(), 3.cm()).Result;

            //result[0].TotalInnerHeightAsIfItWasOneBigElement.ShouldBe(0.cm());
            //            result[0].LayoutedInnerWidth.ShouldBe(0.cm());
            result[1].ViewportTop.ShouldBe(3.cm());
        }
Ejemplo n.º 3
0
        public void split_element_views_corrects_parts_of_element()
        {
            var element = new LayoutedElement(new Box(), Children.Empty) { ForcedInnerHeight = 6.cm() };
            var result = element.Split(15.cm(), 3.cm()).Result;

            result[0].ViewportTop.ShouldBe(0.cm());
            result[1].ViewportTop.ShouldBe(3.cm());
        }