summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
Diffstat (limited to 'src/library')
-rw-r--r--src/library/layout/grid.rs4
-rw-r--r--src/library/layout/locate.rs14
-rw-r--r--src/library/layout/mod.rs2
-rw-r--r--src/library/mod.rs2
4 files changed, 0 insertions, 22 deletions
diff --git a/src/library/layout/grid.rs b/src/library/layout/grid.rs
index 5e86f3d0..93dbf97e 100644
--- a/src/library/layout/grid.rs
+++ b/src/library/layout/grid.rs
@@ -204,9 +204,7 @@ impl<'a> GridLayouter<'a> {
/// Determines the columns sizes and then layouts the grid row-by-row.
pub fn layout(mut self) -> TypResult<Vec<Frame>> {
- self.ctx.pins.freeze();
self.measure_columns()?;
- self.ctx.pins.unfreeze();
for y in 0 .. self.rows.len() {
// Skip to next region if current one is full, but only for content
@@ -372,12 +370,10 @@ impl<'a> GridLayouter<'a> {
pod.base.x = self.regions.base.x;
}
- self.ctx.pins.freeze();
let mut sizes = node
.layout(self.ctx, &pod, self.styles)?
.into_iter()
.map(|frame| frame.height());
- self.ctx.pins.unfreeze();
// For each region, we want to know the maximum height any
// column requires.
diff --git a/src/library/layout/locate.rs b/src/library/layout/locate.rs
deleted file mode 100644
index 74480b91..00000000
--- a/src/library/layout/locate.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-use crate::library::prelude::*;
-use crate::model::{Group, LocateNode};
-
-/// Format content with access to its location on the page.
-pub fn locate(_: &mut Machine, args: &mut Args) -> TypResult<Value> {
- let node = LocateNode::single(args.expect("recipe")?);
- Ok(Value::Content(Content::Locate(node)))
-}
-
-/// Create a new group of locatable elements.
-pub fn group(_: &mut Machine, args: &mut Args) -> TypResult<Value> {
- let key = args.expect("key")?;
- Ok(Value::dynamic(Group::new(key)))
-}
diff --git a/src/library/layout/mod.rs b/src/library/layout/mod.rs
index 6cf5b550..588b15aa 100644
--- a/src/library/layout/mod.rs
+++ b/src/library/layout/mod.rs
@@ -5,7 +5,6 @@ mod columns;
mod container;
mod flow;
mod grid;
-mod locate;
mod pad;
mod page;
mod place;
@@ -17,7 +16,6 @@ pub use columns::*;
pub use container::*;
pub use flow::*;
pub use grid::*;
-pub use locate::*;
pub use pad::*;
pub use page::*;
pub use place::*;
diff --git a/src/library/mod.rs b/src/library/mod.rs
index c1a645fb..566a4f26 100644
--- a/src/library/mod.rs
+++ b/src/library/mod.rs
@@ -57,8 +57,6 @@ pub fn new() -> Scope {
std.def_node::<layout::ColumnsNode>("columns");
std.def_node::<layout::ColbreakNode>("colbreak");
std.def_node::<layout::PlaceNode>("place");
- std.def_fn("locate", layout::locate);
- std.def_fn("group", layout::group);
// Graphics.
std.def_node::<graphics::ImageNode>("image");