Skip to content

Investigate exposing  #2

@stanleyrya

Description

@stanleyrya

Description

It may be possible to adjust the boundary box checks to allow for word clouds in unique shapes. This would be exposed as a customizable feature, similar to the placement function.

The purpose of this story is to experiment and investigate whether or not this is feasible. At this time I recommend doing the following:

  1. Do some reading. How do other word cloud scripts do this?
  2. Try exposing the boundary box logic as a function. This may need refactoring. For example, at the time of writing this ticket I found a "checkRectOutsideBorders" function but it is only called through the "addTextCentered" function. I suppose this is probably due to not knowing the word's dimensions. That being said we should consider moving that logic outwards anyway...
  3. Create an experiment script similar to draw-spiral.
  4. If it's working in the word-cloud script, try copy-pasting the word-cloud object into the demo script to verify that it still works as expected.

Other notes:

  • In the past I have tried adjusting the word cloud script to keep the "previousResult" object as it places words instead of starting over with each new word. If this adjustment is made before this task is picked up, it may conflict with the feature and prevent the shape from being "tight"
  • Speaking of tightness, I'm curious how this feature will result in tight shapes without rethinking how words are used. I believe other word cloud scripts re-introduce words to fill in space or throw out the concept of weight. If this is the case, I would rather not include the feature (unless it can be done very cleanly in code).

Acceptance Criteria

  • Custom boundary boxes are experimented with
  • Custom boundary boxes are either added as a feature or the idea is scrapped
  • If the idea is scrapped, please provide an explanation why. Aka "give it a good go".

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinvestigationA task to experiment and investigate the subject

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions