In a well-written sentence, modifiers are next to the words they describe. If too much distance separates a modifier and its target, the modifier is misplaced. If the sentence fails to include a target, the modifier is dangling.
So the rule is: When the modifier is associated with the wrong target, it’s misplaced. When there is no target, it’s dangling.